summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-10-03 10:25:13 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-10-03 10:25:13 -0400
commit8683d64cc571500347a16e7cb7d144d723250489 (patch)
tree88092530b032876529450f2643e0d0151de602f6
parentb9ebacf40345977ddf18531cb1ebf0f6c56045ae (diff)
downloademacs-8683d64cc571500347a16e7cb7d144d723250489.tar.gz
emacs-8683d64cc571500347a16e7cb7d144d723250489.tar.bz2
emacs-8683d64cc571500347a16e7cb7d144d723250489.zip
(help--symbol-completion-table): Try and fix bug#73473
* lisp/help-fns.el (help--symbol-completion-table): Be more careful with `help-enable-completion-autoload` so we don't load a package in cases where we already know it won't impact the result.
-rw-r--r--lisp/help-fns.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 40e589b3e0a..5cc8df6497f 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -206,9 +206,12 @@ type specifier when available."
,@(when completions-detailed
'((affixation-function . help--symbol-completion-table-affixation)))
(category . symbol-help))
- (when help-enable-completion-autoload
+ (when (and help-enable-completion-autoload
+ (memq action '(nil t lambda)))
(let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
- (help--load-prefixes prefixes)))
+ ;; Don't load FOO.el during `test-completion' of `FOO-'.
+ (unless (and (eq action 'lambda) (assoc string prefixes))
+ (help--load-prefixes prefixes))))
(let ((prefix-completions
(and help-enable-completion-autoload
(mapcar #'intern (all-completions string definition-prefixes)))))