Subject: bug#50067: Context menus

From: Juri Linkov <[email-masked]>
Date: Fri, 27 Aug 2021 09:13:42 +0300

I clicked mouse-3 on the Flymake mode-line indicator expecting a context menu,
but mouse-3 abruptly closed the current buffer.  This can be fixed by such patch:

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 77a807f21a..cc12fce04a 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1256,6 +1256,8 @@ flymake--mode-line-title
     ,(let ((map (make-sparse-keymap)))
        (define-key map [mode-line down-mouse-1]
          flymake-menu)
+       (define-key map [mode-line down-mouse-3]
+         flymake-menu)
        (define-key map [mode-line mouse-2]
          (lambda ()
            (interactive)