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

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

[elpa] externals/el-search ba806ce 251/332: [el-search] Enforce defun st


From: Stefan Monnier
Subject: [elpa] externals/el-search ba806ce 251/332: [el-search] Enforce defun start for heuristic matching
Date: Tue, 1 Dec 2020 15:48:57 -0500 (EST)

branch: externals/el-search
commit ba806cea8f12e70ff0535eed64f232b08ca904d7
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    [el-search] Enforce defun start for heuristic matching
    
    Ensure a sexp is top-level before performing heuristic matching on it.
    This makes it possible to use heuristic matching for context aware
    pattern types we might add in the future.
    
    (el-search--search-pattern-1): Test for (zerop (car (syntax-ppss)))
    before doing heuristic matching with a following sexp.
---
 el-search.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/el-search.el b/el-search.el
index ea15a35..b5a4931 100644
--- a/el-search.el
+++ b/el-search.el
@@ -1045,6 +1045,7 @@ be specified as fourth argument, and COUNT becomes the 
fifth argument."
                      ((and el-search-optimized-search
                            heuristic-matcher
                            (looking-at "^(")
+                           (zerop (car (syntax-ppss)))
                            (not (funcall heuristic-matcher
                                          (current-buffer)
                                          (thunk-delay



reply via email to

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