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

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

[elpa] master 149acb9 07/24: Improve documentation and argument names of


From: Michael Heerdegen
Subject: [elpa] master 149acb9 07/24: Improve documentation and argument names of el-search-query-replace
Date: Thu, 19 May 2016 20:46:37 +0000 (UTC)

branch: master
commit 149acb9fc154d61f8536a395947db1a5ef65dc4b
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    Improve documentation and argument names of el-search-query-replace
---
 packages/el-search/el-search.el |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 9f115e0..f0d7416 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/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))



reply via email to

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