emacs-diffs
[Top][All Lists]
Advanced

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

master 2d15641: * lisp/mouse.el (context-menu-map): Fix when menu is a c


From: Juri Linkov
Subject: master 2d15641: * lisp/mouse.el (context-menu-map): Fix when menu is a command (bug#50851)
Date: Tue, 28 Sep 2021 15:00:56 -0400 (EDT)

branch: master
commit 2d1564103e2024eeb4377b473f28e1523a5206bc
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/mouse.el (context-menu-map): Fix when menu is a command (bug#50851)
    
    * lisp/help.el (help--analyze-key): Get information at the position
    of mouse click such as 'C-h k' on a context menu item (bug#50067).
---
 lisp/help.el  | 2 +-
 lisp/mouse.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/help.el b/lisp/help.el
index 8f77167..b794751 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -695,7 +695,7 @@ Returns a list of the form (BRIEF-DESC DEFN EVENT 
MOUSE-MSG)."
         (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
                            (memq 'drag modifiers))
                         " at that spot" ""))
-        (defn (key-binding key t)))
+        (defn (save-excursion (mouse-set-point event) (key-binding key t))))
     ;; Handle the case where we faked an entry in "Select and Paste" menu.
     (when (and (eq defn nil)
               (stringp (aref key (1- (length key))))
diff --git a/lisp/mouse.el b/lisp/mouse.el
index d80b241..5d4e05f 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -328,7 +328,7 @@ the function `context-menu-filter-function'."
 
     ;; Remove duplicate separators
     (let ((l menu))
-      (while l
+      (while (consp l)
         (when (and (equal (cdr-safe (car l)) menu-bar-separator)
                    (equal (cdr-safe (cadr l)) menu-bar-separator))
           (setcdr l (cddr l)))



reply via email to

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