]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/help.el (help--analyze-key): Add comment.
authorJuri Linkov <juri@linkov.net>
Thu, 30 Sep 2021 07:04:20 +0000 (10:04 +0300)
committerJuri Linkov <juri@linkov.net>
Thu, 30 Sep 2021 07:05:00 +0000 (10:05 +0300)
lisp/help.el

index 02e9b9e8e46f0e8c8c6b6ab488cb6553bf45da39..eaca33795aef6c424a0f8d2b4d8d76affad0162f 100644 (file)
@@ -695,6 +695,10 @@ 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" ""))
+         ;; Use mouse-set-point to handle the case when a menu item
+         ;; is selected from the context menu that should describe KEY
+         ;; at the position of mouse click that opened the context menu.
+         ;; When no mouse was involved, it defaults to window-point.
         (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)