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

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

[elpa] externals/trie af10bd5 043/111: Bug-fix in trie--do-regexp-search


From: Stefan Monnier
Subject: [elpa] externals/trie af10bd5 043/111: Bug-fix in trie--do-regexp-search
Date: Mon, 14 Dec 2020 11:35:17 -0500 (EST)

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

    Bug-fix in trie--do-regexp-search
---
 trie.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/trie.el b/trie.el
index 67cc2dd..b4c8c76 100644
--- a/trie.el
+++ b/trie.el
@@ -153,6 +153,7 @@
 ;; * Replaced wildcard searches with regexp searches, using the tNFA.el tagged
 ;;   non-deterministic finite state automata library. This is both more
 ;;   general *and* more efficient.
+;; * Bug fix in `trie--do-regexp-search'
 ;;
 ;; Version 0.1
 ;; * Initial release (complete rewrite from scratch of tstree.el!)
@@ -1621,6 +1622,17 @@ default key-data cons cell."
   ;; POS is it's length. REVERSE is the usual query argument, and the
   ;; remaining arguments are the corresponding trie functions.
   (declare (special accumulator))
+
+  ;; if NFA has matched, check if trie contains current string
+  (when (tNFA-match-p tNFA)
+    (let (node groups)
+      (when (setq node (trie--find-data-node
+                       --trie--regexp-search--node lookupfun))
+       (setq groups (tNFA-group-data tNFA))
+       (funcall accumulator
+                (if groups (cons seq groups) seq)
+                (trie--node-data node)))))
+
   (cond
    ;; data node
    ((trie--node-data-p --trie--regexp-search--node)



reply via email to

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