emacs-diffs
[Top][All Lists]
Advanced

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

master 8683d64cc57: (help--symbol-completion-table): Try and fix bug#734


From: Stefan Monnier
Subject: master 8683d64cc57: (help--symbol-completion-table): Try and fix bug#73473
Date: Thu, 3 Oct 2024 10:25:20 -0400 (EDT)

branch: master
commit 8683d64cc571500347a16e7cb7d144d723250489
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    (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.
---
 lisp/help-fns.el | 7 +++++--
 1 file 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)))))



reply via email to

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