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

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

[nongnu] elpa/anzu 9d334a4e37 265/288: replaced string should be compile


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 9d334a4e37 265/288: replaced string should be compiled at regexp replace
Date: Thu, 6 Jan 2022 03:58:59 -0500 (EST)

branch: elpa/anzu
commit 9d334a4e37ea908b2847bb9d74a593d5a419fd45
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: Neil Okamoto <neil.okamoto@gmail.com>

    replaced string should be compiled at regexp replace
---
 anzu.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/anzu.el b/anzu.el
index 139e51340e..d9dfb24233 100644
--- a/anzu.el
+++ b/anzu.el
@@ -774,8 +774,11 @@
                             (setq from (car from)
                                   anzu--total-matched 
anzu--last-replaced-count)))
                          ((string-match "\0" from)
-                          (prog1 (substring-no-properties from (match-end 0))
-                            (setq from (substring-no-properties from 0 
(match-beginning 0)))))
+                          (let ((replaced (substring-no-properties from 
(match-end 0))))
+                            (setq from (substring-no-properties from 0 
(match-beginning 0)))
+                            (if use-regexp
+                                (anzu--compile-replace-text replaced)
+                              replaced)))
                          (t
                           (anzu--query-replace-read-to
                            from prompt beg end use-regexp overlay-limit)))))



reply via email to

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