[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)
- [elpa] externals/substitute 8431c6b54d 20/39: Make local variables less verbose, (continued)
- [elpa] externals/substitute 8431c6b54d 20/39: Make local variables less verbose, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 178453e3a4 22/39: Rename scope functions; make code cleaner, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 0c3e1c79ca 26/39: Add indentation in one place, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute b8cd86b7b8 28/39: Add FIXME, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute f5b7b373b1 30/39: Make link to blog easier to find, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 591d6df15b 38/39: Expand README; add video demo, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute af56e87099 31/39: Refine how description of scope is made, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 86423acf44 37/39: Use correct word in a couple of places, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 731cb688e2 39/39: Bump version to trigger GNU ELPA build, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 3f2e429e2d 32/39: Refine substitute-command macro, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute b665f84d4b 14/39: Reuse code in substitute--prompt-with-highlight,
ELPA Syncer <=
- [elpa] externals/substitute 89c3389e1c 15/39: Rename local variable for clarity, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 45096c23d2 16/39: Update symbol of command for clarity, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute f45d238078 21/39: Add missing word in doc string, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 8ac3904158 23/39: Simplify substitute--setup-scope, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 73a1904ea4 24/39: Do not check for fn in 'while' loop, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute cd757fd209 27/39: Remove needless lambdas, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 2fa0edaa5a 29/39: Fix below/above way of identifying current target, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute af3472dc34 33/39: Do not operate on nil thing, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 9ddf421c55 34/39: Rename private function for clarity, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute 673c22fe54 35/39: Rename private function for clarity and move it further up, ELPA Syncer, 2023/01/16