Skip to content

Commit

Permalink
emacs: use type file, not filename (#1675)
Browse files Browse the repository at this point in the history
from voodoos/fix-emacs-ci
  • Loading branch information
voodoos committed Sep 20, 2023
2 parents 5f050e4 + 1a9113c commit a74d0d1
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 @@ -13,6 +13,7 @@ unreleased
and bind <kbd>C-c M-d</kbd> and <kbd>C-c |</kbd> instead to `merlin-destruct`;
bind <kbd>C-u C-c C-t</kbd> to `merlin-type-expr`.
See also <https://github.com/ocaml/merlin/issues/1386#issuecomment-1701567716>
- emacs: remove use of obsolete `defadvice` macro (#1675)

merlin 4.10
==========
Expand Down
10 changes: 5 additions & 5 deletions emacs/merlin.el
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ a new window or not."

(defcustom merlin-logfile nil
"If non-nil, use this file for the log file (should be an absolute path)."
:group 'merlin :type 'filename)
:group 'merlin :type 'file)

(defcustom merlin-arrow-keys-type-enclosing t
"If non-nil, after a type enclosing, C-up and C-down are used
Expand Down Expand Up @@ -807,12 +807,12 @@ If there is no error, do nothing."
(setq err (merlin--error-at-position point errors))
(if err (cons point err) nil)))

(defun merlin--after-save ()
(defun merlin--after-save (&optional _)
(when (and merlin-mode merlin-error-after-save) (merlin-error-check)))

(defadvice basic-save-buffer (after merlin--after-save activate)
"The save hook is called only if buffer was modified, but user might want fresh errors anyway"
(merlin--after-save))
; The save hook is called only if buffer was modified,
; but user might want fresh errors anyway
(advice-add 'basic-save-buffer :after #'merlin--after-save)

(defun merlin-error-prev (&optional group)
"Jump back to previous error."
Expand Down

0 comments on commit a74d0d1

Please sign in to comment.