]> git.eshelyaron.com Git - emacs.git/commitdiff
Unbreak Flymake's diagnostics buffer when revisiting source
authorJohn Shahid <jvshahid@gmail.com>
Fri, 4 Jan 2019 21:28:35 +0000 (21:28 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sat, 5 Jan 2019 11:38:36 +0000 (11:38 +0000)
Fixes: bug#33881
Copyright-paperwork-exempt: yes

* lisp/progmodes/flymake.el (flymake-show-diagnostics-buffer):
Set flymake--diagnostics-buffer-source before reverting.

lisp/progmodes/flymake.el

index 50a9880a14e59ba6eedf253bc16bcf9bc204f826..14940844a42355b813cfe9f566d9a927e034b10d 100644 (file)
@@ -1332,9 +1332,9 @@ POS can be a buffer position or a button"
          (target (or (get-buffer name)
                      (with-current-buffer (get-buffer-create name)
                        (flymake-diagnostics-buffer-mode)
-                       (setq flymake--diagnostics-buffer-source source)
                        (current-buffer)))))
     (with-current-buffer target
+      (setq flymake--diagnostics-buffer-source source)
       (revert-buffer)
       (display-buffer (current-buffer)))))