diff options
author | João Távora <joaotavora@gmail.com> | 2017-10-10 12:47:46 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2017-10-10 13:08:41 +0100 |
commit | 042b3cfbd2ed9da2404d1b3b8ab786c92b507d42 (patch) | |
tree | e0b96645f754a46abf885a0934ab4a89e4a4ebe8 | |
parent | 3dfa2ca4dc471412a8b5442357d5d4bec6611f3f (diff) | |
download | emacs-042b3cfbd2ed9da2404d1b3b8ab786c92b507d42.tar.gz |
Fix two Flymake bugs
* lisp/progmodes/flymake.el (define-fringe-bitmap): Protect
against --without-x.
(flymake--mode-line-format): Ensure mode-line's mouse-4 and mouse-5 work
in their own windows.
-rw-r--r-- | lisp/progmodes/flymake.el | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index c52dad722ce..245cd1ee577 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -142,24 +142,25 @@ Specifically, start it when the buffer is actually displayed." "If non-nil, moving to errors wraps around buffer boundaries." :type 'boolean) -(define-fringe-bitmap 'flymake-double-exclamation-mark - (vector #b00000000 - #b00000000 - #b00000000 - #b00000000 - #b01100110 - #b01100110 - #b01100110 - #b01100110 - #b01100110 - #b01100110 - #b01100110 - #b01100110 - #b00000000 - #b01100110 - #b00000000 - #b00000000 - #b00000000)) +(when (fboundp 'define-fringe-bitmap) + (define-fringe-bitmap 'flymake-double-exclamation-mark + (vector #b00000000 + #b00000000 + #b00000000 + #b00000000 + #b01100110 + #b01100110 + #b01100110 + #b01100110 + #b01100110 + #b01100110 + #b01100110 + #b01100110 + #b00000000 + #b01100110 + #b00000000 + #b00000000 + #b00000000))) (defvar-local flymake-timer nil "Timer for starting syntax check.") @@ -1040,13 +1041,15 @@ applied." ,(let ((map (make-sparse-keymap)) (type type)) (define-key map [mode-line mouse-4] - (lambda (_event) + (lambda (event) (interactive "e") - (flymake-goto-prev-error 1 (list type) t))) + (with-selected-window (posn-window (event-start event)) + (flymake-goto-prev-error 1 (list type) t)))) (define-key map [mode-line mouse-5] - (lambda (_event) + (lambda (event) (interactive "e") - (flymake-goto-next-error 1 (list type) t))) + (with-selected-window (posn-window (event-start event)) + (flymake-goto-next-error 1 (list type) t)))) map) help-echo ,(concat (format "%s diagnostics of type %s\n" |