aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOri2021-07-15 18:57:38 +0200
committerLars Ingebrigtsen2021-07-15 18:57:38 +0200
commiteaefa44acd32f4f7d5e6357546ad22058495ee3f (patch)
treed55db26c8b3b26f8eacb4ce6fd35dae9f4ba0a2d
parent8f5738eb8fc7556b69016976dfa810f7e6275bf8 (diff)
downloademacs-eaefa44acd32f4f7d5e6357546ad22058495ee3f.tar.gz
emacs-eaefa44acd32f4f7d5e6357546ad22058495ee3f.zip
; * 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
-rw-r--r--lisp/help-fns.el2
1 files changed, 1 insertions, 1 deletions
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."
1901 ;; Ignore aliases. 1901 ;; Ignore aliases.
1902 (not (symbolp (symbol-function sym))) 1902 (not (symbolp (symbol-function sym)))
1903 ;; Ignore everything bound. 1903 ;; Ignore everything bound.
1904 (not (where-is-internal sym)) 1904 (not (where-is-internal sym nil t))
1905 (apply #'derived-mode-p (command-modes sym))) 1905 (apply #'derived-mode-p (command-modes sym)))
1906 (push sym functions)))) 1906 (push sym functions))))
1907 (with-temp-buffer 1907 (with-temp-buffer