From 1783452534d4915b853a1eb882b63a0dd1bed9af Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Wed, 24 Jul 2019 11:43:17 +0100 Subject: [PATCH] Emacs: reset buffer configuration when stopping the merlin server Otherwise, restarting the server after changing merlin-command has no effect, because the old value for merlin-command is cached in merlin-buffer-configuration. --- emacs/merlin.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emacs/merlin.el b/emacs/merlin.el index c030a986b0..1c656e44f7 100644 --- a/emacs/merlin.el +++ b/emacs/merlin.el @@ -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)))