* 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).
(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))))
;; 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)))