diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 6be5cd4a50..ef4eb447a5 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1950,7 +1950,9 @@ help-fns--list-local-commands ;; Ignore aliases. (not (symbolp (symbol-function sym))) ;; Ignore everything bound. - (not (where-is-internal sym nil t)) + (not (with-demoted-errors + ;; Ignore errors in context-menu. + (where-is-internal sym nil t))) (apply #'derived-mode-p (command-modes sym))) (push sym functions)))) (with-temp-buffer diff --git a/lisp/simple.el b/lisp/simple.el index 3695415163..d90fd7efdf 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2120,7 +2120,9 @@ read-extended-command--affixation (mapcar (lambda (command-name) (let* ((fun (and (stringp command-name) (intern-soft command-name))) - (binding (where-is-internal fun overriding-local-map t)) + (binding (with-demoted-errors + ;; Ignore errors in context-menu. + (where-is-internal fun overriding-local-map t))) (obsolete (get fun 'byte-obsolete-info)) (alias (symbol-function fun)) (suffix (cond ((symbolp alias)