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

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

[elpa] externals/el-search e7dda1b 118/332: Call el-search--wrap-pattern


From: Stefan Monnier
Subject: [elpa] externals/el-search e7dda1b 118/332: Call el-search--wrap-pattern at better places
Date: Tue, 1 Dec 2020 15:48:25 -0500 (EST)

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

    Call el-search--wrap-pattern at better places
    
    Try to call `el-search--wrap-pattern' directly before compiling the
    pattern to avoid that the wrapped pattern appears in the histories.
---
 el-search.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/el-search.el b/el-search.el
index ae00661..9ce2571 100644
--- a/el-search.el
+++ b/el-search.el
@@ -574,7 +574,7 @@ directory searches like `el-search-directory' or
     (setq this-command 'el-search-pattern) ;in case we come from isearch
     ;; Make input available also in query-replace history
     (el-search--pushnew-to-history input 'el-search-query-replace-history)
-    (el-search--wrap-pattern pattern)))
+    pattern))
 
 
 (defun el-search--end-of-sexp ()
@@ -893,7 +893,7 @@ With optional FROM-HERE non-nil, the first buffer in STREAM
 should be the current buffer, and searching will start at the
 current buffer's point instead of its beginning."
   (setq el-search--success nil)
-  (let ((matcher (el-search--matcher pattern)))
+  (let ((matcher (el-search--matcher (el-search--wrap-pattern pattern))))
     (setq el-search--current-search (el-search-make-search matcher stream))
     (setq el-search--current-matcher matcher))
   (setq el-search--current-pattern pattern)
@@ -1523,7 +1523,8 @@ Hit any key to proceed."
         (el-search-keep-hl t) (opoint (point))
         (get-replacement (el-search--matcher pattern replacement))
         (skip-matches-in-replacement 'ask)
-        (matcher (setq el-search--current-matcher (el-search--matcher 
pattern))))
+        (matcher (setq el-search--current-matcher
+                       (el-search--matcher (el-search--wrap-pattern 
pattern)))))
     (unwind-protect
         (progn
 
@@ -1679,7 +1680,7 @@ Hit any key to proceed."
     (when (and (symbolp read-to)
                (not (el-search--contains-p (el-search--matcher `',read-to) 
read-from)))
       (el-search--maybe-warn-about-unquoted-symbol read-to))
-    (list (el-search--wrap-pattern read-from) read-to to)))
+    (list read-from read-to to)))
 
 ;;;###autoload
 (defun el-search-query-replace (from-pattern to-expr &optional textual-to)



reply via email to

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