From: David Kastrup Date: Mon, 2 Feb 2004 12:50:49 +0000 (+0000) Subject: (perform-replace): Allow 'literal argument in X-Git-Tag: ttn-vms-21-2-B4~7773 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d83a97ab5fbcde063e4a87042cd721a23f13fbe0;p=emacs.git (perform-replace): Allow 'literal argument in regexp-flag to indicate literal replacement. (query-replace-regexp-eval): Use it. --- diff --git a/lisp/replace.el b/lisp/replace.el index 0c89c22b1fa..e8ecef12039 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -223,7 +223,7 @@ Fourth and fifth arg START and END specify the region to operate on." (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 @@ make, or the user didn't cancel the call." (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