emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master eaefa44 2/2: ; * lisp/help-fns.el: Speed up `describe-mode'


From: Lars Ingebrigtsen
Subject: master eaefa44 2/2: ; * lisp/help-fns.el: Speed up `describe-mode'
Date: Thu, 15 Jul 2021 12:57:48 -0400 (EDT)

branch: master
commit eaefa44acd32f4f7d5e6357546ad22058495ee3f
Author: Ori <ori@oribarbut.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    ; * 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 d3fdb47..cb248b1 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]