Skip to content

Commit

Permalink
Emacs: reset buffer configuration when stopping the merlin server
Browse files Browse the repository at this point in the history
Otherwise, restarting the server after changing merlin-command has no
effect, because the old value for merlin-command is cached in
merlin-buffer-configuration.
  • Loading branch information
Wilfred committed Jul 24, 2019
1 parent 64fff7d commit 1783452
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions emacs/merlin.el
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,11 @@ return (LOC1 . LOC2)."
(unless merlin-mode (message "Buffer is not managed by merlin."))
(when merlin-mode
(merlin--call-merlin "stop-server")
;; `merlin-buffer-configuration' is buffer-local, so reset it in
;; all buffers.
(dolist (buf (buffer-list))
(with-current-buffer buf
(kill-local-variable 'merlin-buffer-configurationn)))
(setq merlin-erroneous-buffer nil)
(setq merlin-buffer-configuration nil)))

Expand Down

0 comments on commit 1783452

Please sign in to comment.