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

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

[elpa] externals/substitute b665f84d4b 14/39: Reuse code in substitute--


From: ELPA Syncer
Subject: [elpa] externals/substitute b665f84d4b 14/39: Reuse code in substitute--prompt-with-highlight
Date: Mon, 16 Jan 2023 11:58:50 -0500 (EST)

branch: externals/substitute
commit b665f84d4b042a968c079c336c56761078cc92af
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Reuse code in substitute--prompt-with-highlight
---
 substitute.el | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/substitute.el b/substitute.el
index f029b96845..58a53dd358 100644
--- a/substitute.el
+++ b/substitute.el
@@ -100,18 +100,13 @@ and related."
 
 (defun substitute--prompt-with-highlight (target scope)
   "Prompt for string while referencing TARGET and SCOPE.
-Substantiate the interactivity of `substitute-replace-target'."
+Highlight the TARGET's matching occurences per the user option
+`substitute-highlight'."
   (let ((pretty-target (substitute--pretty-target target)))
     (unwind-protect
         (progn
           (highlight-regexp target (substitute--highlight-face))
-          (read-string
-           (format "Replace `%s' %s with: "
-                   (propertize pretty-target 'face 'error)
-                   (substitute--scope scope))
-           nil
-           'substitute--history
-           pretty-target))
+          (substitute--prompt-without-highlight pretty-target scope))
       (unhighlight-regexp target))))
 
 (defun substitute--prompt (target scope)



reply via email to

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