aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/isearch.el31
-rw-r--r--lisp/replace.el5
3 files changed, 35 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5327ce12e7b..98e0382853d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,15 @@
12013-06-13 Juri Linkov <juri@jurta.org> 12013-06-13 Juri Linkov <juri@jurta.org>
2 2
3 * replace.el (perform-replace): Display "symbol " and other search
4 modes from `isearch-message-prefix' in the *Help* buffer.
5
6 * isearch.el (isearch-query-replace): Add " symbol" and other
7 possible search modes from `isearch-message-prefix' to the prompt.
8 (isearch-occur): Use `with-isearch-suspended' to not exit Isearch
9 when reading a regexp to collect.
10
112013-06-13 Juri Linkov <juri@jurta.org>
12
3 * isearch.el (word-search-regexp): Match whitespace if the search 13 * isearch.el (word-search-regexp): Match whitespace if the search
4 string begins or ends in whitespace. The LAX arg is applied to 14 string begins or ends in whitespace. The LAX arg is applied to
5 both ends of the search string. Use `regexp-quote' and explicit 15 both ends of the search string. Use `regexp-quote' and explicit
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 37070ba6f51..ec4f32aecca 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1678,9 +1678,10 @@ the beginning or the end of the string need not match a symbol boundary."
1678 "Start `query-replace' with string to replace from last search string. 1678 "Start `query-replace' with string to replace from last search string.
1679The arg DELIMITED (prefix arg if interactive), if non-nil, means replace 1679The arg DELIMITED (prefix arg if interactive), if non-nil, means replace
1680only matches surrounded by word boundaries. Note that using the prefix arg 1680only matches surrounded by word boundaries. Note that using the prefix arg
1681is possible only when `isearch-allow-scroll' is non-nil, and it doesn't 1681is possible only when `isearch-allow-scroll' is non-nil or
1682always provide the correct matches for `query-replace', so the preferred 1682`isearch-allow-prefix' is non-nil, and it doesn't always provide the
1683way to run word replacements from Isearch is `M-s w ... M-%'." 1683correct matches for `query-replace', so the preferred way to run word
1684replacements from Isearch is `M-s w ... M-%'."
1684 (interactive 1685 (interactive
1685 (list current-prefix-arg)) 1686 (list current-prefix-arg))
1686 (barf-if-buffer-read-only) 1687 (barf-if-buffer-read-only)
@@ -1714,7 +1715,15 @@ way to run word replacements from Isearch is `M-s w ... M-%'."
1714 (query-replace-read-to 1715 (query-replace-read-to
1715 isearch-string 1716 isearch-string
1716 (concat "Query replace" 1717 (concat "Query replace"
1717 (if (or delimited isearch-word) " word" "") 1718 (if (or delimited isearch-word)
1719 (let* ((symbol (or delimited isearch-word))
1720 (string (and symbol (symbolp symbol)
1721 (get symbol 'isearch-message-prefix))))
1722 (if (stringp string)
1723 ;; Move space from the end to the beginning.
1724 (replace-regexp-in-string "\\(.*\\) \\'" " \\1" string)
1725 " word"))
1726 "")
1718 (if isearch-regexp " regexp" "") 1727 (if isearch-regexp " regexp" "")
1719 (if (and transient-mark-mode mark-active) " in region" "")) 1728 (if (and transient-mark-mode mark-active) " in region" ""))
1720 isearch-regexp) 1729 isearch-regexp)
@@ -1756,12 +1765,14 @@ characters in that string."
1756 ;; No subexpression so collect the entire match. 1765 ;; No subexpression so collect the entire match.
1757 "\\&" 1766 "\\&"
1758 ;; Get the regexp for collection pattern. 1767 ;; Get the regexp for collection pattern.
1759 (isearch-done nil t) 1768 (let ((default (car occur-collect-regexp-history))
1760 (isearch-clean-overlays) 1769 regexp-collect)
1761 (let ((default (car occur-collect-regexp-history))) 1770 (with-isearch-suspended
1762 (read-regexp 1771 (setq regexp-collect
1763 (format "Regexp to collect (default %s): " default) 1772 (read-regexp
1764 default 'occur-collect-regexp-history))) 1773 (format "Regexp to collect (default %s): " default)
1774 default 'occur-collect-regexp-history)))
1775 regexp-collect))
1765 ;; Otherwise normal occur takes numerical prefix argument. 1776 ;; Otherwise normal occur takes numerical prefix argument.
1766 (when current-prefix-arg 1777 (when current-prefix-arg
1767 (prefix-numeric-value current-prefix-arg)))))) 1778 (prefix-numeric-value current-prefix-arg))))))
diff --git a/lisp/replace.el b/lisp/replace.el
index 24cfccf60fd..be0ecda20fa 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2156,7 +2156,10 @@ make, or the user didn't cancel the call."
2156 (with-output-to-temp-buffer "*Help*" 2156 (with-output-to-temp-buffer "*Help*"
2157 (princ 2157 (princ
2158 (concat "Query replacing " 2158 (concat "Query replacing "
2159 (if delimited-flag "word " "") 2159 (if delimited-flag
2160 (or (and (symbolp delimited-flag)
2161 (get delimited-flag 'isearch-message-prefix))
2162 "word ") "")
2160 (if regexp-flag "regexp " "") 2163 (if regexp-flag "regexp " "")
2161 from-string " with " 2164 from-string " with "
2162 next-replacement ".\n\n" 2165 next-replacement ".\n\n"