emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/dict-tree eccfe92 047/154: Bug fix in dictree--do-query


From: Stefan Monnier
Subject: [elpa] externals/dict-tree eccfe92 047/154: Bug fix in dictree--do-query
Date: Mon, 14 Dec 2020 12:21:42 -0500 (EST)

branch: externals/dict-tree
commit eccfe922310d9de842ce3a76b1784d8014e5e432
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>

    Bug fix in dictree--do-query
---
 dict-tree.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/dict-tree.el b/dict-tree.el
index edf9591..0bd1bf2 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -1764,7 +1764,7 @@ Returns nil if the stack is empty."
   ;; wrap DICT in a list if necessary
   (when (dictree-p dict) (setq dict (list dict)))
 
-  (let (cache cacheparam completions cmpl)
+  (let (cache cacheparam completions cmpl cache-entry)
     ;; map over all dictionaries in list
     (dolist (dic dict)
       (setq cache (funcall cachefun dic)
@@ -1784,17 +1784,18 @@ Returns nil if the stack is empty."
 
 
        ;; if there's a cached result with enough completions, use it
-       ((and (setq cache
+       ((and (setq cache-entry
                   (if cacheparam
                       (gethash (cons arg reverse) cache)
                     nil))
-            (or (null (dictree--cache-maxnum cache))
-                (and maxnum (<= maxnum (dictree--cache-maxnum cache)))))
-       (setq cmpl (dictree--cache-completions cache))
+            (or (null (dictree--cache-maxnum cache-entry))
+                (and maxnum
+                     (<= maxnum (dictree--cache-maxnum cache-entry)))))
+       (setq cmpl (dictree--cache-completions cache-entry))
        ;; drop any excess completions
        (when (and maxnum
-                  (or (null (dictree--cache-maxnum cache))
-                      (> (dictree--cache-maxnum cache) maxnum)))
+                  (or (null (dictree--cache-maxnum cache-entry))
+                      (> (dictree--cache-maxnum cache-entry) maxnum)))
          (setcdr (nthcdr (1- maxnum) completions) nil)))
 
 



reply via email to

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