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

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

[elpa] master c990155: [el-search] Enforce defun start for heuristic mat


From: Michael Heerdegen
Subject: [elpa] master c990155: [el-search] Enforce defun start for heuristic matching
Date: Sat, 23 Jun 2018 12:21:39 -0400 (EDT)

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

    [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.
---
 packages/el-search/el-search.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index ea15a35..b5a4931 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/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]