changeset 53778:7898852aa054

(perform-replace): Allow 'literal argument in regexp-flag to indicate literal replacement. (query-replace-regexp-eval): Use it.
author David Kastrup <dak@gnu.org>
date Mon, 02 Feb 2004 12:50:49 +0000
parents ef82e49f9ad1
children 5b728a418323 1d2f73785d9d
files lisp/replace.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Mon Feb 02 12:50:24 2004 +0000
+++ b/lisp/replace.el	Mon Feb 02 12:50:49 2004 +0000
@@ -223,7 +223,7 @@
 	   (if (and transient-mark-mode mark-active)
 	       (region-end)))))
   (perform-replace regexp (cons 'replace-eval-replacement to-expr)
-		   t t delimited nil nil start end))
+		   t 'literal delimited nil nil start end))
 
 (defun map-query-replace-regexp (regexp to-strings &optional n start end)
   "Replace some matches for REGEXP with various strings, in rotation.
@@ -1057,7 +1057,7 @@
 	(case-fold-search (and case-fold-search
 			       (string-equal from-string
 					     (downcase from-string))))
-	(literal (not regexp-flag))
+	(literal (or (not regexp-flag) (eq regexp-flag 'literal)))
 	(search-function (if regexp-flag 're-search-forward 'search-forward))
 	(search-string from-string)
 	(real-match-data nil)		; the match data for the current match