[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109961: * lisp/replace.el (replace-r
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109961: * lisp/replace.el (replace-regexp-lax-whitespace): New defcustom. |
Date: |
Mon, 10 Sep 2012 01:15:24 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109961
fixes bug: http://debbugs.gnu.org/10885
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Mon 2012-09-10 01:15:24 +0300
message:
* lisp/replace.el (replace-regexp-lax-whitespace): New defcustom.
(replace-lax-whitespace, query-replace-regexp)
(query-replace-regexp-eval, replace-regexp): Doc fix.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace to replace-lax-whitespace and
isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace.
* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace to isearch-lax-whitespace and
replace-regexp-lax-whitespace to
isearch-regexp-lax-whitespace.
modified:
lisp/ChangeLog
lisp/isearch.el
lisp/replace.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-09 21:11:14 +0000
+++ b/lisp/ChangeLog 2012-09-09 22:15:24 +0000
@@ -1,3 +1,17 @@
+2012-09-09 Juri Linkov <address@hidden>
+
+ * replace.el (replace-regexp-lax-whitespace): New defcustom.
+ (replace-lax-whitespace, query-replace-regexp)
+ (query-replace-regexp-eval, replace-regexp): Doc fix.
+ (perform-replace, replace-highlight): Let-bind
+ isearch-lax-whitespace to replace-lax-whitespace and
+ isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace.
+
+ * isearch.el (isearch-query-replace): Let-bind
+ replace-lax-whitespace to isearch-lax-whitespace and
+ replace-regexp-lax-whitespace to
+ isearch-regexp-lax-whitespace. (Bug#10885)
+
2012-09-09 Stefan Monnier <address@hidden>
* eshell/em-unix.el (eshell/sudo): Explicitly drop return value.
=== modified file 'lisp/isearch.el'
--- a/lisp/isearch.el 2012-09-06 08:49:40 +0000
+++ b/lisp/isearch.el 2012-09-09 22:15:24 +0000
@@ -1581,10 +1581,9 @@
;; `isearch-no-upper-case-p' in `perform-replace'
(search-upper-case nil)
(replace-lax-whitespace
- (and search-whitespace-regexp
- (if isearch-regexp
- isearch-regexp-lax-whitespace
- isearch-lax-whitespace)))
+ isearch-lax-whitespace)
+ (replace-regexp-lax-whitespace
+ isearch-regexp-lax-whitespace)
;; Set `isearch-recursive-edit' to nil to prevent calling
;; `exit-recursive-edit' in `isearch-done' that terminates
;; the execution of this command when it is non-nil.
=== modified file 'lisp/replace.el'
--- a/lisp/replace.el 2012-09-09 06:43:47 +0000
+++ b/lisp/replace.el 2012-09-09 22:15:24 +0000
@@ -35,7 +35,15 @@
(defcustom replace-lax-whitespace nil
"Non-nil means `query-replace' matches a sequence of whitespace chars.
-When you enter a space or spaces in the strings or regexps to be replaced,
+When you enter a space or spaces in the strings to be replaced,
+it will match any sequence matched by the regexp `search-whitespace-regexp'."
+ :type 'boolean
+ :group 'matching
+ :version "24.3")
+
+(defcustom replace-regexp-lax-whitespace nil
+ "Non-nil means `query-replace-regexp' matches a sequence of whitespace chars.
+When you enter a space or spaces in the regexps to be replaced,
it will match any sequence matched by the regexp `search-whitespace-regexp'."
:type 'boolean
:group 'matching
@@ -282,7 +290,7 @@
all caps, or capitalized, then its replacement is upcased or
capitalized.)
-If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp
+If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
@@ -362,7 +370,7 @@
Preserves case in each replacement if `case-replace' and `case-fold-search'
are non-nil and REGEXP has no uppercase letters.
-If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp
+If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
@@ -499,7 +507,7 @@
Preserve case in each match if `case-replace' and `case-fold-search'
are non-nil and REGEXP has no uppercase letters.
-If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp
+If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
@@ -1803,9 +1811,9 @@
(let ((isearch-regexp regexp-flag)
(isearch-word delimited-flag)
(isearch-lax-whitespace
- (and replace-lax-whitespace (not regexp-flag)))
+ replace-lax-whitespace)
(isearch-regexp-lax-whitespace
- (and replace-lax-whitespace regexp-flag))
+ replace-regexp-lax-whitespace)
(isearch-case-fold-search case-fold-search)
(isearch-forward t))
(isearch-search-fun))))
@@ -2160,9 +2168,9 @@
(isearch-regexp regexp-flag)
(isearch-word delimited-flag)
(isearch-lax-whitespace
- (and replace-lax-whitespace (not regexp-flag)))
+ replace-lax-whitespace)
(isearch-regexp-lax-whitespace
- (and replace-lax-whitespace regexp-flag))
+ replace-regexp-lax-whitespace)
(isearch-case-fold-search case-fold-search)
(isearch-forward t)
(isearch-error nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109961: * lisp/replace.el (replace-regexp-lax-whitespace): New defcustom.,
Juri Linkov <=