summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2004-02-02 12:50:49 +0000
committerDavid Kastrup <dak@gnu.org>2004-02-02 12:50:49 +0000
commitd83a97ab5fbcde063e4a87042cd721a23f13fbe0 (patch)
tree2bf3e96b674e00f36773aa768651a7984e07973f /lisp
parent0fc8fa73bb560f97d40cc2a38ddece51e1032e9f (diff)
downloademacs-d83a97ab5fbcde063e4a87042cd721a23f13fbe0.tar.gz
emacs-d83a97ab5fbcde063e4a87042cd721a23f13fbe0.tar.bz2
emacs-d83a97ab5fbcde063e4a87042cd721a23f13fbe0.zip
(perform-replace): Allow 'literal argument in
regexp-flag to indicate literal replacement. (query-replace-regexp-eval): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/replace.el4
1 files changed, 2 insertions, 2 deletions
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