unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28732: flymake mouse-wheel portability fix
@ 2017-10-07 15:31 Charles A. Roelli
  2017-10-21 13:06 ` Charles A. Roelli
  2018-02-26 21:38 ` Glenn Morris
  0 siblings, 2 replies; 10+ messages in thread
From: Charles A. Roelli @ 2017-10-07 15:31 UTC (permalink / raw)
  To: 28732

The flymake mode line mouse-wheel scroll thing needs the following fix
to be more portable.

This change also removes an extra newline at the end of the tooltip,
which doesn't have to be there as far as I can see.

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 45f0adf..007de8f 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -951,11 +951,13 @@ flymake--mode-line-format
                      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")
                             (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")
                             (flymake-goto-next-error 1 (list type) t)))
@@ -967,7 +969,9 @@ flymake--mode-line-format
                                                   '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 "[")





^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-03 10:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-07 15:31 bug#28732: flymake mouse-wheel portability fix Charles A. Roelli
2017-10-21 13:06 ` Charles A. Roelli
2018-02-26 21:38 ` Glenn Morris
2018-02-27 19:28   ` Charles A. Roelli
2018-02-27 19:31     ` Eli Zaretskii
2018-02-28 19:02       ` Charles A. Roelli
2018-02-28 20:32         ` Eli Zaretskii
2018-03-01 19:43           ` Charles A. Roelli
2018-03-02  2:10         ` Noam Postavsky
2018-03-03 10:43           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).