Skip to content

Commit

Permalink
Fix byte-compile warnings (#2119)
Browse files Browse the repository at this point in the history
- Use `...' instead of '...'
- Remove needless quotes from choice values
- Escape single quote in docstring
  • Loading branch information
syohex authored Jul 7, 2022
1 parent 73a0092 commit 384bdf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Preserve comments around object open/close flag (#2097, @trefis, @gpetiot)
- Preserve comments around private/mutable/virtual keywords (#2098, @trefis, @gpetiot)
- Closing parentheses of local open now comply with `indicate-multiline-delimiters` (#2116, @gpetiot)
- emacs: fix byte-compile warnings (#2119, @syohex)

### Changes

Expand Down
10 changes: 5 additions & 5 deletions emacs/ocamlformat.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
(require 'vc)

(defcustom ocamlformat-command "ocamlformat"
"The 'ocamlformat' command."
"The `ocamlformat' command."
:type 'string
:group 'ocamlformat)

Expand Down Expand Up @@ -84,19 +84,19 @@ echo output if used from inside a `before-save-hook'."
(defcustom ocamlformat-file-kind nil
"Add a parse argument to ocamlformat if using an unrecognized extension.
It can either be set to 'implementation, 'interface or
It can either be set to \\='implementation, \\='interface or
nil (default)."
:type '(choice
(const :tag "implementation" 'implementation)
(const :tag "interface" 'interface)
(const :tag "implementation" implementation)
(const :tag "interface" interface)
(const :tag "none" nil))
:group 'ocamlformat)

;;;###autoload
(defun ocamlformat-before-save ()
"Add this to .emacs to run ocamlformat on the current buffer when saving:
\(add-hook 'before-save-hook 'ocamlformat-before-save)."
\(add-hook \\='before-save-hook \\='ocamlformat-before-save)."
(interactive)
(when (eq major-mode 'tuareg-mode) (ocamlformat)))

Expand Down

0 comments on commit 384bdf4

Please sign in to comment.