diff options
author | Charles A. Roelli <charles@aurox.ch> | 2017-10-21 14:56:59 +0200 |
---|---|---|
committer | Charles A. Roelli <charles@aurox.ch> | 2017-10-21 14:56:59 +0200 |
commit | 75bb4827637111a210c79583f45dd1c5d59a745f (patch) | |
tree | 9d0e2183b8e57cff1ec6c3cd2944544772f023fe /lisp/progmodes/flymake.el | |
parent | 035d7ac7e42f1e1e82f4948e19ef8d8188bb902c (diff) | |
download | emacs-75bb4827637111a210c79583f45dd1c5d59a745f.tar.gz emacs-75bb4827637111a210c79583f45dd1c5d59a745f.tar.bz2 emacs-75bb4827637111a210c79583f45dd1c5d59a745f.zip |
Make flymake's mouse-wheel interaction portable (Bug#28732)
* lisp/progmodes/flymake.el (flymake--mode-line-format): Bind
'mouse-wheel-down-event' and 'mouse-wheel-up-event' instead of
'mouse-4' and 'mouse-5'. Update the tooltip text accordingly, and
remove a stray newline in it.
Diffstat (limited to 'lisp/progmodes/flymake.el')
-rw-r--r-- | lisp/progmodes/flymake.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 3c588f02fa6..1048bc50655 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1068,12 +1068,14 @@ applied." keymap ,(let ((map (make-sparse-keymap)) (type type)) - (define-key map [mode-line mouse-4] + (define-key map (vector 'mode-line + mouse-wheel-down-event) (lambda (event) (interactive "e") (with-selected-window (posn-window (event-start event)) (flymake-goto-prev-error 1 (list type) t)))) - (define-key map [mode-line mouse-5] + (define-key map (vector 'mode-line + mouse-wheel-up-event) (lambda (event) (interactive "e") (with-selected-window (posn-window (event-start event)) @@ -1086,7 +1088,9 @@ applied." 'face face) (propertize (format "%s" type) 'face face)) - "mouse-4/mouse-5: previous/next of this type\n")) + (format "%s/%s: previous/next of this type" + mouse-wheel-down-event + mouse-wheel-up-event))) into forms finally return `((:propertize "[") |