[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/substitute af56e87099 31/39: Refine how description of
From: |
ELPA Syncer |
Subject: |
[elpa] externals/substitute af56e87099 31/39: Refine how description of scope is made |
Date: |
Mon, 16 Jan 2023 11:58:52 -0500 (EST) |
branch: externals/substitute
commit af56e8709911a88595f786c49ffb786d9f99ee7c
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refine how description of scope is made
---
substitute.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/substitute.el b/substitute.el
index 80e844a532..4a04ce0041 100644
--- a/substitute.el
+++ b/substitute.el
@@ -61,20 +61,20 @@ For a reference function, see
`substitute-report-operation'."
(defvar substitute--history '()
"Minibuffer history for substitution commands.")
-(defun substitute--scope (scope)
+(defun substitute--scope-description (scope)
"Return string that describes SCOPE in plain terms.
Possible meaningful values for SCOPE are:
- `below' :: from point to the end of the buffer.
- `above' :: from point to the beginning of the buffer.
-- nil :: across the whole buffer.
-- non-nil :: limit to the current defun per `narrow-to-defun'."
+- `defun' :: limit to the current defun per `narrow-to-defun'.
+- nil :: across the whole buffer."
(pcase scope
('below "from point to the END of the buffer")
('above "from point to the BEGINNING of the buffer")
- ('nil "across the BUFFER")
- (_ "in the current DEFUN")))
+ ('defun "in the current DEFUN")
+ (_ "across the BUFFER")))
(defun substitute--pretty-target (target)
"Remove regexp delimiters from TARGET.
@@ -88,7 +88,7 @@ and related."
(read-string
(format "Replace `%s' %s with: "
(propertize pretty-target 'face 'error)
- (substitute--scope scope))
+ (substitute--scope-description scope))
nil
'substitute--history
pretty-target)))
@@ -170,7 +170,7 @@ This is the subroutine of `substitute-target' and related."
(replace-match sub nil t))))
(run-hook-with-args 'substitute-post-replace-hook
target sub (length count)
- (substitute--scope scope))))
+ (substitute--scope-description scope))))
(defun substitute--target ()
"Return target or report an error.
- [elpa] externals/substitute e90152fc90 18/39: Bump version for package-vc-rebuild to do its job, (continued)
- [elpa] externals/substitute e90152fc90 18/39: Bump version for package-vc-rebuild to do its job, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute e55a121666 25/39: Make minor formatting change, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute be5b7f3e71 11/39: Streamline all commands with a macro, ELPA Syncer, 2023/01/16
- [elpa] externals/substitute a1382f1860 19/39: Tweak substitute backronym, ELPA Syncer, 2023/01/16
- [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 <=
- [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, 2023/01/16
- [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