Don't error on 'C-h f menu-bar-open-mouse RET'

* lisp/help-fns.el (help-fns--insert-menu-bindings): Fix error when
passed 'menu-bar-open-mouse'.  (Bug#76172)
This commit is contained in:
Stefan Kangas 2025-02-10 14:57:03 +01:00
parent e33eb91061
commit 55ffbeaab1

View file

@ -649,7 +649,8 @@ the C sources, too."
(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)