* lisp/help.el (help--analyze-key): Avoid mouse-set-point for non-mouse events
(bug#51173)
This commit is contained in:
parent
efb1cd7fa9
commit
9ed53b022d
1 changed files with 5 additions and 3 deletions
|
@ -695,11 +695,13 @@ Returns a list of the form (BRIEF-DESC DEFN EVENT MOUSE-MSG)."
|
||||||
(mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
|
(mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
|
||||||
(memq 'drag modifiers))
|
(memq 'drag modifiers))
|
||||||
" at that spot" ""))
|
" at that spot" ""))
|
||||||
;; Use mouse-set-point to handle the case when a menu item
|
;; Use `mouse-set-point' to handle the case when a menu item
|
||||||
;; is selected from the context menu that should describe KEY
|
;; is selected from the context menu that should describe KEY
|
||||||
;; at the position of mouse click that opened the context menu.
|
;; at the position of mouse click that opened the context menu.
|
||||||
;; When no mouse was involved, it defaults to window-point.
|
;; When no mouse was involved, don't use `mouse-set-point'.
|
||||||
(defn (save-excursion (mouse-set-point event) (key-binding key t))))
|
(defn (if (consp event)
|
||||||
|
(save-excursion (mouse-set-point event) (key-binding key t))
|
||||||
|
(key-binding key t))))
|
||||||
;; Handle the case where we faked an entry in "Select and Paste" menu.
|
;; Handle the case where we faked an entry in "Select and Paste" menu.
|
||||||
(when (and (eq defn nil)
|
(when (and (eq defn nil)
|
||||||
(stringp (aref key (1- (length key))))
|
(stringp (aref key (1- (length key))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue