# HG changeset patch # User Richard M. Stallman # Date 1087787743 0 # Node ID b3821f47a6d442a5ed7f3bb6e0b202d0edd064b2 # Parent c6dcd23450de80b123d43badb564cc66d3e84e3c (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. diff -r c6dcd23450de -r b3821f47a6d4 lisp/isearch.el --- a/lisp/isearch.el Mon Jun 21 03:12:46 2004 +0000 +++ b/lisp/isearch.el Mon Jun 21 03:15:43 2004 +0000 @@ -999,7 +999,8 @@ (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 @@ (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 @@ ;; 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.