aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-06-21 03:15:43 +0000
committerRichard M. Stallman2004-06-21 03:15:43 +0000
commit512bfd85dfb32d139c6be2440654f9db8e305ac5 (patch)
treeafc8ec06597bc008f44f04be8d56b4354c580ffc
parentd9e4328d52192088d5b534d110e049b01d3b1882 (diff)
downloademacs-512bfd85dfb32d139c6be2440654f9db8e305ac5.tar.gz
emacs-512bfd85dfb32d139c6be2440654f9db8e305ac5.zip
(isearch-repeat): Avoid testing old match data.
(isearch-message): Display trailing space in special font when search is failing. (isearch-search-fun-function): Doc fix.
-rw-r--r--lisp/isearch.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8357527dc8c..3898aa13f61 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -999,7 +999,8 @@ Use `isearch-exit' to quit without signaling."
999 999
1000 (if (equal isearch-string "") 1000 (if (equal isearch-string "")
1001 (setq isearch-success t) 1001 (setq isearch-success t)
1002 (if (and isearch-success (equal (match-end 0) (match-beginning 0)) 1002 (if (and isearch-success
1003 (equal (point) isearch-other-end)
1003 (not isearch-just-started)) 1004 (not isearch-just-started))
1004 ;; If repeating a search that found 1005 ;; If repeating a search that found
1005 ;; an empty string, ensure we advance. 1006 ;; an empty string, ensure we advance.
@@ -1764,7 +1765,13 @@ If there is no completion possible, say so and continue searching."
1764 (let ((cursor-in-echo-area ellipsis) 1765 (let ((cursor-in-echo-area ellipsis)
1765 (m (concat 1766 (m (concat
1766 (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental) 1767 (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
1767 isearch-message 1768 (if (and (not isearch-success)
1769 (string-match " +$" isearch-message))
1770 (concat
1771 (substring isearch-message 0 (match-beginning 0))
1772 (propertize (substring isearch-message (match-beginning 0))
1773 'face 'trailing-whitespace))
1774 isearch-message)
1768 (isearch-message-suffix c-q-hack ellipsis) 1775 (isearch-message-suffix c-q-hack ellipsis)
1769 ))) 1776 )))
1770 (if c-q-hack 1777 (if c-q-hack
@@ -1811,7 +1818,11 @@ If there is no completion possible, say so and continue searching."
1811 1818
1812;; Searching 1819;; Searching
1813 1820
1814(defvar isearch-search-fun-function nil "Override `isearch-function-fun'.") 1821(defvar isearch-search-fun-function nil
1822 "Override `isearch-search-fun'.
1823This function should return the search function for isearch to use.
1824It will call this function with three arguments
1825as if it were `search-forward'.")
1815 1826
1816(defun isearch-search-fun () 1827(defun isearch-search-fun ()
1817 "Return the function to use for the search. 1828 "Return the function to use for the search.