[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/trie 4dc003b 006/111: Fixed bug when deleting non-exist
From: |
Stefan Monnier |
Subject: |
[elpa] externals/trie 4dc003b 006/111: Fixed bug when deleting non-existent entries. |
Date: |
Mon, 14 Dec 2020 11:35:09 -0500 (EST) |
branch: externals/trie
commit 4dc003b7cc57fb4ed5fc69055e7e639f6035066f
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
Fixed bug when deleting non-existent entries.
---
trie.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/trie.el b/trie.el
index e51309c..4909d99 100644
--- a/trie.el
+++ b/trie.el
@@ -736,13 +736,15 @@ order, or descending order if REVERSE is non-nil."
trie-mapf--accumulate)
(trie--mapc
(lambda (node seq)
- (funcall combinator
- (funcall trie-mapf--function seq (trie--node-data node))
- trie-mapf--accumulate))
+ (setq trie-mapf--accumulate
+ (funcall combinator
+ (funcall trie-mapf--function seq (trie--node-data node))
+ trie-mapf--accumulate)))
(trie--mapfun trie)
(trie--root trie)
(cond ((eq type 'string) "") ((eq type 'lisp) ()) (t []))
- reverse)))
+ reverse)
+ trie-mapf--accumulate))
(defun trie-mapcar (function trie &optional type reverse)
@@ -924,7 +926,8 @@ TRIE."
(trie--deletefun trie)
(trie--emptyfun trie)
(trie--cmpfun trie))
- (cons key (trie--node-data trie--deleted-node))))
+ (when trie--deleted-node
+ (cons key (trie--node-data trie--deleted-node)))))
(defun trie--do-delete (node seq deletefun emptyfun cmpfun)
@@ -949,7 +952,7 @@ TRIE."
(and (trie--do-delete n (trie--subseq seq 1)
deletefun emptyfun cmpfun)
(funcall emptyfun (trie--node-subtree n))))
- cmpfun)))
+ nil cmpfun)))
- [elpa] branch externals/trie created (now 63da3b1), Stefan Monnier, 2020/12/14
- [elpa] externals/trie 1697b5f 001/111: trie.el re-implements tstree.el using AVL trees, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 5a0883f 005/111: Fixed bug in trie-complete when passed list of prefixes., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 4dc003b 006/111: Fixed bug when deleting non-existent entries.,
Stefan Monnier <=
- [elpa] externals/trie d998322 011/111: Made trie--terminator symbol into a configurable defconst., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 6cdaed0 046/111: Removed left-over debugging code and other minor tidying., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 160f092 054/111: Revert "Replaced advice with cedet-edebug.el for pretty-printing", Stefan Monnier, 2020/12/14
- [elpa] externals/trie defa7e0 053/111: Replaced advice with cedet-edebug.el for pretty-printing, Stefan Monnier, 2020/12/14
- [elpa] externals/trie af10bd5 043/111: Bug-fix in trie--do-regexp-search, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 58c6685 014/111: Replaced bare avl-trees, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 9f5b6c2 060/111: Simplified persistent-storage code for tries and dict-trees., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 6aa6701 033/111: Added optional RESULTFUN argument to trie query functions,, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 2345832 047/111: Advised edebug-prin1 and edebug-prin1-to-string to prevent edebug hanging, Stefan Monnier, 2020/12/14
- [elpa] externals/trie e1be744 030/111: Bug-fix in trie--do-wildcard-search, Stefan Monnier, 2020/12/14