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

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

[elpa] externals/el-search a661225 272/332: [el-search] Minor tweaks in


From: Stefan Monnier
Subject: [elpa] externals/el-search a661225 272/332: [el-search] Minor tweaks in el-search-query-replace
Date: Tue, 1 Dec 2020 15:49:02 -0500 (EST)

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

    [el-search] Minor tweaks in el-search-query-replace
    
    * packages/el-search/el-search.el
    (el-search--search-and-replace-pattern): Visually annotate whether the
    current match has been replaced.
    Use only one description for the 'r' key no matter whether the current
    match has been replaced.
    Tweak prompt for ! key.
---
 el-search.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/el-search.el b/el-search.el
index c2347a3..bc7bc36 100644
--- a/el-search.el
+++ b/el-search.el
@@ -3707,9 +3707,10 @@ exactly you did?  Thanks!"))))
                                   (read-multiple-choice
                                    (let ((nbr-done  (+ nbr-replaced 
nbr-skipped))
                                          (nbr-to-do (el-search-count-matches 
pattern)))
-                                     (format "[%d/%d]"
+                                     (format "[%d/%d] %s"
                                              (if replaced-this nbr-done (1+ 
nbr-done))
-                                             (+ nbr-done nbr-to-do)))
+                                             (+ nbr-done nbr-to-do)
+                                             (if replaced-this "*" "-")))
                                    (delq nil
                                          (list
                                           `(?y "y"
@@ -3718,10 +3719,8 @@ exactly you did?  Thanks!"))))
                                                   "Replace match and move to 
the next"))
                                           (and (not replaced-this)
                                                '(?n "n" "Move to the next 
match"))
-                                          `(?r "r"
-                                               ,(if (not replaced-this)
-                                                    "Replace match but don't 
move"
-                                                  "Restore match"))
+                                          '(?r "r" "\
+Replace match but don't move or restore match if already replaced")
                                           '(?! "all" "Replace all remaining 
matches in this buffer")
                                           '(?b "skip buf"
                                                "Skip this buffer and any 
remaining matches in it")
@@ -3765,7 +3764,8 @@ Toggle splicing mode (\\[describe-function] 
el-search-query-replace for details)
                                                                            
(el-search-object-properties
                                                                             
el-search--current-search)))
                                                            (eq (car 
(read-multiple-choice
-                                                                     "Replace 
in all following buffers?"
+                                                                     "\
+Also replace in all following buffers?"
                                                                      '((?! 
"Only this"
                                                                            "\
 Replace only remaining matches in this buffer")



reply via email to

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