[Top][All Lists]

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

[elpa] master 2cf727a: Fix starting a search with `el-search-this-sexp'

From: Michael Heerdegen
Subject: [elpa] master 2cf727a: Fix starting a search with `el-search-this-sexp'
Date: Mon, 4 Dec 2017 04:21:23 -0500 (EST)

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

    Fix starting a search with `el-search-this-sexp'
    Improve behavior of `el-search-jump-to-search-head' and
    `el-search-query-replace' called directly after `el-search-this-sexp'.
 packages/el-search/el-search.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 728e384..e9f8b9c 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -2274,6 +2274,8 @@ Use the normal search commands to seize the search."
        (lambda () (stream (list current-buffer))))
     (el-search--next-buffer el-search--current-search)
+    (setf (el-search-head-position (el-search-object-head 
+          (copy-marker (point)))
     (setq this-command 'el-search-pattern
           el-search--success t)
     (el-search-hl-other-matches (el-search--current-matcher))
@@ -3201,6 +3203,8 @@ query-replace all matches following point in the current 
       (eq (el-search-head-buffer search-head) (current-buffer))
       (equal from-pattern (el-search-object-pattern el-search--current-search))
       (eq last-command 'el-search-pattern)
+      ;; A `el-search-this-sexp' that wasn't activated doesn't count
+      (el-search-object-last-match el-search--current-search)
       (prog1 t
         (el-search--message-no-log "Using the current search to drive 
         (sit-for 1.))))))

reply via email to

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