# HG changeset patch # User David Kastrup # Date 1075726249 0 # Node ID 7898852aa0547e9d7d18fd9c5f7f7e49f5c11fff # Parent ef82e49f9ad12cd0e1597f32988ff60c84e7164d (perform-replace): Allow 'literal argument in regexp-flag to indicate literal replacement. (query-replace-regexp-eval): Use it. diff -r ef82e49f9ad1 -r 7898852aa054 lisp/replace.el --- 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