Skip to content

Commit eaefa44

Browse files
obarlarsmagne
authored andcommitted
; * lisp/help-fns.el: Speed up `describe-mode'
* 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
1 parent 8f5738e commit eaefa44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lisp/help-fns.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ documentation for the major and minor modes of that buffer."
19011901
;; Ignore aliases.
19021902
(not (symbolp (symbol-function sym)))
19031903
;; Ignore everything bound.
1904-
(not (where-is-internal sym))
1904+
(not (where-is-internal sym nil t))
19051905
(apply #'derived-mode-p (command-modes sym)))
19061906
(push sym functions))))
19071907
(with-temp-buffer

0 commit comments

Comments
 (0)