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

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

[elpa] externals/el-search d3eaaf0 198/332: Make the some-context functi


From: Stefan Monnier
Subject: [elpa] externals/el-search d3eaaf0 198/332: Make the some-context function include an opening backquote
Date: Tue, 1 Dec 2020 15:48:44 -0500 (EST)

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

    Make the some-context function include an opening backquote
    
    When choosing `el-search-occur-get-some-context' as
    `el-search-get-occur-context-function', when the calculated context
    follows a backquote, also include that backquote.
    
    This also works around one symptom of Emacs bug#29857.
    
    * el-search/el-search.el (el-search-occur-get-some-context): Do it.
---
 el-search.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/el-search.el b/el-search.el
index 088c869..6ea435f 100644
--- a/el-search.el
+++ b/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.4.0.11
+;; Version: 1.4.0.12
 ;; Package-Requires: ((emacs "25") (stream "2.2.4"))
 
 
@@ -2504,7 +2504,9 @@ Prompt for a new pattern and revert."
                         (setq end (point))))
                ((or (pred atom) `(,(pred atom))) t)
                ((guard (< (- end start) 100))    t)))))
-        (try-go-upwards (lambda (pos) (condition-case nil (scan-lists pos -1 1)
+        (try-go-upwards (lambda (pos) (condition-case nil
+                                     (when-let ((pos (scan-lists pos -1 1)))
+                                       (if (eq (char-before pos) ?`) (1- pos) 
pos))
                                    (scan-error nil)))))
     (when (funcall need-more-context-p match-beg)
       (setq context-beg (funcall try-go-upwards match-beg))



reply via email to

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