summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2004-07-03 05:18:38 +0000
committerJuri Linkov <juri@jurta.org>2004-07-03 05:18:38 +0000
commitf1f6079c82a8f9aaaa1785942bb32e74ea54ad84 (patch)
treea0e75556fa13895841d09a592a2b80a895674706 /lisp/replace.el
parent5297945104b9d44e178422ed877184633d28b0f6 (diff)
(query-replace-read-args): Swallow space after 'foo,
not after (quote foo). Match space only immediately after symbol, not anywhere in the whole string.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 8e8b43d66c6..4c381c658e5 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -125,8 +125,9 @@ strings or patterns."
;; Swallow a space after 'foo
;; but not after (quote foo).
(and (eq (car-safe (car pos)) 'quote)
- (= ?\( (aref to 0))))
- (string-match " " to (cdr pos)))
+ (not (= ?\( (aref to 0)))))
+ (eq (string-match " " to (cdr pos))
+ (cdr pos)))
(1+ (cdr pos))
(cdr pos))))
(setq to (substring to end)))))
@@ -212,7 +213,7 @@ In interactive calls, the replacement text can contain `\\,'
followed by a Lisp expression. Each
replacement evaluates that expression to compute the replacement
string. Inside of that expression, `\\&' is a string denoting the
-whole match as a sting, `\\N' for a partial match, `\\#&' and `\\#N'
+whole match as a string, `\\N' for a partial match, `\\#&' and `\\#N'
for the whole or a partial match converted to a number with
`string-to-number', and `\\#' itself for the number of replacements
done so far (starting with zero).