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

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

[elpa] master 213f565 1/2: * el-search/el-search.el: Fix infloop in el-s


From: Michael Heerdegen
Subject: [elpa] master 213f565 1/2: * el-search/el-search.el: Fix infloop in el-search--flatten-tree
Date: Sat, 12 May 2018 12:58:01 -0400 (EDT)

branch: master
commit 213f5653563a97ad69db1f38464c56671f94494c
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    * el-search/el-search.el: Fix infloop in el-search--flatten-tree
    
    This fixes `el-search--flatten-tree' inflooping in cases like
    
      (el-search--flatten-tree '(x . #1=(y . #1#)))
    
    (el-search--flatten-tree): Be more strict in adding objects to the
    WALKED-OBJECTS hash-table.
---
 packages/el-search/el-search.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index e9b70f2..b65bd9e 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -1299,7 +1299,9 @@ PATTERN and combining the heuristic matchers of the 
subpatterns."
                                   (while (consp object)
                                     (walker (car object))
                                     (setq object (cdr object))
-                                    (when (gethash object walked-objects) 
(setq object nil)))
+                                    (if (gethash object walked-objects)
+                                        (setq object nil)
+                                      (puthash object t walked-objects)))
                                   (when object ;dotted list
                                     (walker object)))
                               (cl-loop for elt being the elements of object do 
(walker elt)))))))



reply via email to

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