aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2004-06-21 03:15:43 +0000
committerRichard M. Stallman <[email protected]>2004-06-21 03:15:43 +0000
commit512bfd85dfb32d139c6be2440654f9db8e305ac5 (patch)
treeafc8ec06597bc008f44f04be8d56b4354c580ffc /lisp/isearch.el
parentd9e4328d52192088d5b534d110e049b01d3b1882 (diff)
(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.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8357527dc8..3898aa13f6 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -999,7 +999,8 @@ Use `isearch-exit' to quit without signaling."
(if (equal isearch-string "")
(setq isearch-success t)
- (if (and isearch-success (equal (match-end 0) (match-beginning 0))
+ (if (and isearch-success
+ (equal (point) isearch-other-end)
(not isearch-just-started))
;; If repeating a search that found
;; an empty string, ensure we advance.
@@ -1764,7 +1765,13 @@ If there is no completion possible, say so and continue searching."
(let ((cursor-in-echo-area ellipsis)
(m (concat
(isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
- isearch-message
+ (if (and (not isearch-success)
+ (string-match " +$" isearch-message))
+ (concat
+ (substring isearch-message 0 (match-beginning 0))
+ (propertize (substring isearch-message (match-beginning 0))
+ 'face 'trailing-whitespace))
+ isearch-message)
(isearch-message-suffix c-q-hack ellipsis)
)))
(if c-q-hack
@@ -1811,7 +1818,11 @@ If there is no completion possible, say so and continue searching."
;; Searching
-(defvar isearch-search-fun-function nil "Override `isearch-function-fun'.")
+(defvar isearch-search-fun-function nil
+ "Override `isearch-search-fun'.
+This function should return the search function for isearch to use.
+It will call this function with three arguments
+as if it were `search-forward'.")
(defun isearch-search-fun ()
"Return the function to use for the search.