# HG changeset patch # User Juri Linkov # Date 1088831918 0 # Node ID cc1deb864ed6122cbf5286f4181547423bf08c7f # Parent a2e4dbfb37667a6f36173fcc2065b46b60a5eea6 (query-replace-read-args): Swallow space after 'foo, not after (quote foo). Match space only immediately after symbol, not anywhere in the whole string. diff -r a2e4dbfb3766 -r cc1deb864ed6 lisp/replace.el --- a/lisp/replace.el Sat Jul 03 05:18:06 2004 +0000 +++ b/lisp/replace.el Sat Jul 03 05:18:38 2004 +0000 @@ -125,8 +125,9 @@ ;; 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 @@ 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).