emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1a4ed8e: * lisp/mouse.el: More fixes for context-menu.


From: Juri Linkov
Subject: master 1a4ed8e: * lisp/mouse.el: More fixes for context-menu.
Date: Wed, 18 Aug 2021 13:01:30 -0400 (EDT)

branch: master
commit 1a4ed8ee7843b7cb929f066781a4a754bebf0f4d
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/mouse.el: More fixes for context-menu.
    
    (context-menu-map): Remove menu title "Context Menu" (bug#50067).
    (context-menu-minor): Reverse sub-menus to display exactly in the same order
    as on the menu bar.
---
 etc/NEWS      | 5 ++---
 lisp/mouse.el | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index cc779b4..b221f13 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -396,9 +396,8 @@ onto 'file-name-history'.
 *** New minor mode 'context-menu-mode' for context menus popped by 'mouse-3'.
 When this mode is enabled, clicking 'down-mouse-3' anywhere in the buffer
 pops up a menu whose contents depends on surrounding context near the
-mouse click.  You can customize the order of the default sub-menus in
-the context menu by customizing the user option
-'context-menu-functions'.
+mouse click.  You can change the order of the default sub-menus in the
+context menu by customizing the user option 'context-menu-functions'.
 
 +++
 *** The "Edit => Clear" menu item now obeys a rectangular region.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5424039..d2a5200 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -304,7 +304,7 @@ the same menu with changes such as added new menu items."
 
 (defun context-menu-map ()
   "Return composite menu map."
-  (let ((menu (make-sparse-keymap "Context Menu")))
+  (let ((menu (make-sparse-keymap)))
     (run-hook-wrapped 'context-menu-functions
                       (lambda (fun)
                         (setq menu (funcall fun menu))
@@ -341,7 +341,7 @@ the same menu with changes such as added new menu items."
   "Minor modes submenus."
   (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
   (define-key-after menu [separator-minor] menu-bar-separator)
-  (dolist (mode (minor-mode-key-binding [menu-bar]))
+  (dolist (mode (reverse (minor-mode-key-binding [menu-bar])))
     (when (and (consp mode) (symbol-value (car mode)))
       (map-keymap (lambda (key binding)
                     (when (consp binding)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]