* lisp/help-fns.el (help-fns--list-local-commands): Speed up (bug#49579).
A predicate checks if there are no key bindings for a given function. A
full list of bindings is not needed, even a single binding is sufficient
to say the function is bound. Set FIRSTONLY arg in where-is-internal so
this predicate runs faster, with functional equivalence. For some
configurations this has a noticeable improvement on the speed of
describe-mode.
Copyright-paperwork-exempt: yes
;; Ignore aliases.
(not (symbolp (symbol-function sym)))
;; Ignore everything bound.
- (not (where-is-internal sym))
+ (not (where-is-internal sym nil t))
(apply #'derived-mode-p (command-modes sym)))
(push sym functions))))
(with-temp-buffer