]> git.eshelyaron.com Git - emacs.git/commitdiff
Make flymake's mouse-wheel interaction portable (Bug#28732)
authorCharles A. Roelli <charles@aurox.ch>
Sat, 21 Oct 2017 12:56:59 +0000 (14:56 +0200)
committerCharles A. Roelli <charles@aurox.ch>
Sat, 21 Oct 2017 12:56:59 +0000 (14:56 +0200)
* 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.

lisp/progmodes/flymake.el

index 3c588f02fa6d149cc6b9e512d2bc76757327f521..1048bc5065559991c64453cb238ff41d4752c063 100644 (file)
@@ -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 "[")