GNU bug report logs -
#76172
31.0.50; C-h f menu-bar-open-mouse signals error
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Mon, 10 Feb 2025 05:12:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 31.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
tags 76172 + patch
thanks
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
> 1. emacs -Q -nw
> 2. C-h f menu-bar-open-mouse RET
>
> => Wrong type argument: listp, menu-bar-open-mouse
It looks like this special case is just not covered. Evaluating
(car (cdr (cdr (assq 'menu-bar global-map))))
leads to
(mouse-1 . menu-bar-open-mouse)
but that has a different form than all other menu bar entries, and the
`(nth 1 ...)` call will obviously not work.
This should fix it:
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 9324cf85454..6112df99850 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -649,7 +649,8 @@ help-fns--insert-menu-bindings
(lambda (entry level)
(when (symbolp map)
(setq map (symbol-function map)))
- (when-let* ((elem (assq entry (cdr map))))
+ (when-let* ((elem (assq entry (cdr map)))
+ (_ (proper-list-p elem)))
(when (> level 0)
(push sep string))
(if (eq (nth 1 elem) 'menu-item)
This bug report was last modified 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.