branch: scratch/mheerdegen-preview
commit 76163ac5fe8d94d06b3d560b059d8a43066fcd57
Author: Michael Heerdegen <michael_heerde...@web.de>
Commit: Michael Heerdegen <michael_heerde...@web.de>

    WIP: [el-search] Fix an infloop
---
 packages/el-search/el-search.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index ff222b2..dbcb4ab 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -1138,12 +1138,11 @@ be specified as fourth argument, and COUNT becomes the 
fifth argument."
                                      ;; the thunk hasn't been forced
                                      (scan-lists (point) 1 0))))
                      ((el-search--match-p matcher current-expr)
-                      (setq match-beg
-                            (and (or (not bound)
-                                     (<= (el-search--end-of-sexp match-beg) 
bound)
-                                     ;; don't fail for >: a subsequent match 
may end before BOUND
-                                     )
-                                 (point))))
+                      (if (or (not bound)
+                              (<= (el-search--end-of-sexp match-beg) bound))
+                          (setq match-beg (point))
+                        ;; don't fail: a subsequent match may end before BOUND
+                        (el-search--skip-expression current-expr)))
                      (t (el-search--skip-expression current-expr))))
                   (when (and bound (<= bound (point)))
                     (throw 'no-match t)))

Reply via email to