[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/replace.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/replace.el,v |
Date: |
Fri, 06 Jun 2008 20:32:13 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/06/06 20:32:12
Index: replace.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/replace.el,v
retrieving revision 1.271
retrieving revision 1.272
diff -u -b -r1.271 -r1.272
--- replace.el 6 May 2008 07:57:48 -0000 1.271
+++ replace.el 6 Jun 2008 20:32:11 -0000 1.272
@@ -1486,6 +1486,17 @@
(replace-match newtext fixedcase literal)
noedit)
+(defvar replace-search-function 'search-forward
+ "Function to use when searching for strings to replace.
+It is used by `query-replace' and `replace-string', and is called
+with three arguments, as if it were `search-forward'.")
+
+(defvar replace-re-search-function 're-search-forward
+ "Function to use when searching for regexps to replace.
+It is used by `query-replace-regexp', `replace-regexp',
+`query-replace-regexp-eval', and `map-query-replace-regexp'. It
+is called with three arguments, as if it were `search-forward'.")
+
(defun perform-replace (from-string replacements
query-flag regexp-flag delimited-flag
&optional repeat-count map start end)
@@ -1511,7 +1522,10 @@
case-fold-search))
(nocasify (not (and case-replace case-fold-search)))
(literal (or (not regexp-flag) (eq regexp-flag 'literal)))
- (search-function (if regexp-flag 're-search-forward 'search-forward))
+ (search-function
+ (if regexp-flag
+ replace-re-search-function
+ replace-search-function))
(search-string from-string)
(real-match-data nil) ; The match data for the current match.
(next-replacement nil)
- [Emacs-diffs] Changes to emacs/lisp/replace.el,v,
Chong Yidong <=