branch: master commit 6c6f02e08d809612c1cc3151ebcf0b5a4999295e Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@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. --- packages/el-search/el-search.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 088c869..6ea435f 100644 --- a/packages/el-search/el-search.el +++ b/packages/el-search/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))