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

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

[elpa] externals/dict-tree b6175f6 058/154: Bug-fix to meta-dicts: don't


From: Stefan Monnier
Subject: [elpa] externals/dict-tree b6175f6 058/154: Bug-fix to meta-dicts: don't add them to meta-dict-lists of constituent lists if caching is disabled,
Date: Mon, 14 Dec 2020 12:21:44 -0500 (EST)

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

    Bug-fix to meta-dicts: don't add them to meta-dict-lists of constituent 
lists if caching is disabled,
    or they're unnamed (assumed to be temporary).
---
 dict-tree.el | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/dict-tree.el b/dict-tree.el
index d5e62f3..3c6cf84 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -852,12 +852,18 @@ The other arguments are as for `dictree-create'."
     (unless (or (null name) unlisted)
       (push dict dictree-loaded-list))
     ;; update meta-dict-list cells of constituent dictionaries
-    (mapc
-     (lambda (dic)
-       (if (symbolp dic) (setq dic (eval dic)))
-       (setf (dictree--meta-dict-list dic)
-            (cons dict (dictree--meta-dict-list dic))))
-     dictionary-list)
+    (unless (or (null name)
+               (not (or lookup-cache-threshold
+                        complete-cache-threshold
+                        complete-ranked-cache-threshold
+                        wildcard-cache-threshold
+                        wildcard-ranked-cache-threshold)))
+      (mapc
+       (lambda (dic)
+        (if (symbolp dic) (setq dic (eval dic)))
+        (setf (dictree--meta-dict-list dic)
+              (cons dict (dictree--meta-dict-list dic))))
+       dictionary-list))
     dict))
 
 



reply via email to

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