[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/el-search a0b44dd 078/332: Improve documentation and ar
From: |
Stefan Monnier |
Subject: |
[elpa] externals/el-search a0b44dd 078/332: Improve documentation and argument names of el-search-query-replace |
Date: |
Tue, 1 Dec 2020 15:48:15 -0500 (EST) |
branch: externals/el-search
commit a0b44dd2c6e6111c5ff00062e3231520d6fae517
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>
Improve documentation and argument names of el-search-query-replace
---
el-search.el | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/el-search.el b/el-search.el
index 9f115e0..f0d7416 100644
--- a/el-search.el
+++ b/el-search.el
@@ -1023,19 +1023,26 @@ Hit any key to proceed."
(defun el-search-query-replace-read-args ()
(barf-if-buffer-read-only)
- (let* ((from (el-search--read-pattern "Replace from: "))
+ (let* ((from (el-search--read-pattern "Query replace pattern: "))
(to (let ((el-search--initial-mb-contents nil))
(el-search--read-pattern "Replace with result of evaluation
of: " from))))
(list (el-search--wrap-pattern (read from)) (read to) to)))
;;;###autoload
-(defun el-search-query-replace (from to &optional to-input-string)
- "Replace some occurrences of FROM pattern with evaluated TO."
+(defun el-search-query-replace (from-pattern to-expr &optional textual-to)
+ "Replace some matches of \"el-search\" pattern FROM-PATTERN.
+
+TO-EXPR is an Elisp expression that is evaluated repeatedly for
+each match with bindings created in FROM-PATTERN in effect to
+produce a replacement expression.
+
+As each match is found, the user must type a character saying
+what to do with it. For directions, type ? at that time."
(interactive (el-search-query-replace-read-args))
(setq this-command 'el-search-query-replace) ;in case we come from isearch
- (setq el-search-current-pattern from)
+ (setq el-search-current-pattern from-pattern)
(barf-if-buffer-read-only)
- (el-search-search-and-replace-pattern from to nil to-input-string))
+ (el-search-search-and-replace-pattern from-pattern to-expr nil textual-to))
(defun el-search--take-over-from-isearch (&optional goto-left-end)
(let ((other-end (and goto-left-end isearch-other-end))
- [elpa] externals/el-search 0809f99 072/332: New user option: el-search-use-sloppy-strings, (continued)
- [elpa] externals/el-search 0809f99 072/332: New user option: el-search-use-sloppy-strings, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search ba82854 022/332: rename a local variable, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 1222012 046/332: prerequisites to allow replace with multiple expressions, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 0af261a 050/332: el-search: some cleanup, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 3370594 060/332: el-search: New pattern type `l', Stefan Monnier, 2020/12/01
- [elpa] externals/el-search b936a28 062/332: Go to isearch left end when starting replace, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 59c6139 064/332: Complete and document what a SYMBOL in `l' matches, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 2c1cdeb 066/332: factor out minibuffer setup hook fun; treat empty input, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 02168e0 068/332: Tweak docstring of el-search--ensure-sexp-start, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search d6ae854 070/332: Minor change in `string' pattern, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search a0b44dd 078/332: Improve documentation and argument names of el-search-query-replace,
Stefan Monnier <=
- [elpa] externals/el-search 1864f4a 077/332: Comment and whitespace changes only, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search b5b6d83 089/332: Make query-replace accept FROM -> TO style input, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 68f10d7 091/332: Reduce duration of a `sit-for', Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 29d6f46 090/332: Rename a local variable, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 5b608a1 094/332: Set initial input for replace when coming from el-search-pattern, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 9c3c04d 093/332: Clean up el-search-read-expression-map; add some doc, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search b4e79fb 081/332: Add patterns for character properties, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 2dd24a9 096/332: Factor out `el-search--replace-hunk', Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 852643e 100/332: Fix some quoting problems in doc strings, Stefan Monnier, 2020/12/01
- [elpa] externals/el-search 2366cda 107/332: Improve `change' and `changed', Stefan Monnier, 2020/12/01