aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorJuri Linkov2016-02-10 02:46:37 +0200
committerJuri Linkov2016-02-10 02:46:37 +0200
commit6bac035d6014662e19bf400ce51585b84a1d655b (patch)
treeeaa74f5276c9049eaa4528c088d20f5607d3555b /lisp/replace.el
parentee909aa2bb3c30eb3b842426088a32a4504a0d0d (diff)
downloademacs-6bac035d6014662e19bf400ce51585b84a1d655b.tar.gz
emacs-6bac035d6014662e19bf400ce51585b84a1d655b.zip
* lisp/replace.el (replace-match-maybe-edit): Make arg `backward' optional.
Doc fix. (replace-search, replace-highlight): Make arg `backward' optional. (Bug#18388)
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index dfe8cd739a2..488eff7928a 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1980,13 +1980,15 @@ but coerced to the correct value of INTEGERS."
1980 new))) 1980 new)))
1981 (match-data integers reuse t))) 1981 (match-data integers reuse t)))
1982 1982
1983(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data backward) 1983(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data
1984 &optional backward)
1984 "Make a replacement with `replace-match', editing `\\?'. 1985 "Make a replacement with `replace-match', editing `\\?'.
1985FIXEDCASE, LITERAL are passed to `replace-match' (which see). 1986FIXEDCASE, LITERAL are passed to `replace-match' (which see).
1986After possibly editing it (if `\\?' is present), NEWTEXT is also 1987After possibly editing it (if `\\?' is present), NEWTEXT is also
1987passed to `replace-match'. If NOEDIT is true, no check for `\\?' 1988passed to `replace-match'. If NOEDIT is true, no check for `\\?'
1988is made (to save time). MATCH-DATA is used for the replacement. 1989is made (to save time). MATCH-DATA is used for the replacement.
1989In case editing is done, it is changed to use markers. 1990In case editing is done, it is changed to use markers. BACKWARD is
1991used to reverse the replacement direction.
1990 1992
1991The return value is non-nil if there has been no `\\?' or NOEDIT was 1993The return value is non-nil if there has been no `\\?' or NOEDIT was
1992passed in. If LITERAL is set, no checking is done, anyway." 1994passed in. If LITERAL is set, no checking is done, anyway."
@@ -2027,7 +2029,7 @@ It is called with three arguments, as if it were
2027`re-search-forward'.") 2029`re-search-forward'.")
2028 2030
2029(defun replace-search (search-string limit regexp-flag delimited-flag 2031(defun replace-search (search-string limit regexp-flag delimited-flag
2030 case-fold-search backward) 2032 case-fold-search &optional backward)
2031 "Search for the next occurrence of SEARCH-STRING to replace." 2033 "Search for the next occurrence of SEARCH-STRING to replace."
2032 ;; Let-bind global isearch-* variables to values used 2034 ;; Let-bind global isearch-* variables to values used
2033 ;; to search the next replacement. These let-bindings 2035 ;; to search the next replacement. These let-bindings
@@ -2061,7 +2063,7 @@ It is called with three arguments, as if it were
2061 2063
2062(defun replace-highlight (match-beg match-end range-beg range-end 2064(defun replace-highlight (match-beg match-end range-beg range-end
2063 search-string regexp-flag delimited-flag 2065 search-string regexp-flag delimited-flag
2064 case-fold-search backward) 2066 case-fold-search &optional backward)
2065 (if query-replace-highlight 2067 (if query-replace-highlight
2066 (if replace-overlay 2068 (if replace-overlay
2067 (move-overlay replace-overlay match-beg match-end (current-buffer)) 2069 (move-overlay replace-overlay match-beg match-end (current-buffer))