From eaefa44acd32f4f7d5e6357546ad22058495ee3f Mon Sep 17 00:00:00 2001 From: Ori Date: Thu, 15 Jul 2021 18:57:38 +0200 Subject: [PATCH] ; * 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 --- lisp/help-fns.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d3fdb47a348..cb248b1d009 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1901,7 +1901,7 @@ documentation for the major and minor modes of that buffer." ;; 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 -- 2.39.2