]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Flymake help-echo functions across windows (bug#29142)
authorJoão Távora <joaotavora@gmail.com>
Sun, 5 Nov 2017 14:58:07 +0000 (14:58 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sun, 5 Nov 2017 14:58:07 +0000 (14:58 +0000)
* lisp/progmodes/flymake.el (flymake--highlight-line): Use
with-selected-window.
(flymake-goto-next-error): Call help-echo with a window and an
overlay.

lisp/progmodes/flymake.el

index e13d79770e5d22638eaef906d5db5777f83e6873..e833cd949eeb9f4287c93f501e881c394be5f2e7 100644 (file)
@@ -520,11 +520,12 @@ associated `flymake-category' return DEFAULT."
         (flymake--fringe-overlay-spec
          (overlay-get ov 'bitmap)))
       (default-maybe 'help-echo
-        (lambda (_window _ov pos)
-          (mapconcat
-           #'flymake--diag-text
-           (flymake-diagnostics pos)
-           "\n")))
+        (lambda (window _ov pos)
+          (with-selected-window window
+            (mapconcat
+             #'flymake--diag-text
+             (flymake-diagnostics pos)
+             "\n"))))
       (default-maybe 'severity (warning-numeric-level :error))
       (default-maybe 'priority (+ 100 (overlay-get ov 'severity))))
     ;; Some properties can't be overridden.
@@ -949,7 +950,7 @@ applied."
              (message
               "%s"
               (funcall (overlay-get target 'help-echo)
-                       nil nil (point)))))
+                       (selected-window) target (point)))))
           (interactive
            (user-error "No more Flymake errors%s"
                        (if filter