diff options
| author | Bastien Guerry | 2008-02-12 00:50:44 +0000 |
|---|---|---|
| committer | Bastien Guerry | 2008-02-12 00:50:44 +0000 |
| commit | 723e5b84bb1c1a0e3293b4aa95cc5e5f30ceb8b7 (patch) | |
| tree | 99b537db4d449aa1805c3097968619ebd6595578 | |
| parent | 1046da1cf4056438b0e5ce2aa96725fb6999b454 (diff) | |
| download | emacs-723e5b84bb1c1a0e3293b4aa95cc5e5f30ceb8b7.tar.gz emacs-723e5b84bb1c1a0e3293b4aa95cc5e5f30ceb8b7.zip | |
* isearch.el:
(isearch-fail): New face.
(isearch-message): Highlight failure part of input.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/isearch.el | 33 |
2 files changed, 26 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7bacad73ca7..8a88010753b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-02-11 Drew Adams <drew.adams@oracle.com> | ||
| 2 | |||
| 3 | * isearch.el: | ||
| 4 | (isearch-fail): New face. | ||
| 5 | (isearch-message): Highlight failure part of input. | ||
| 6 | |||
| 1 | 2008-02-11 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2008-02-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * ibuffer.el (ibuffer-header-line-format): New var. | 9 | * ibuffer.el (ibuffer-header-line-format): New var. |
| @@ -49,6 +55,7 @@ | |||
| 49 | 55 | ||
| 50 | * calendar/time-date.el (emacs-uptime): New function. | 56 | * calendar/time-date.el (emacs-uptime): New function. |
| 51 | 57 | ||
| 58 | >>>>>>> 1.12767 | ||
| 52 | 2008-02-10 Bastien Guerry <bzg@altern.org> | 59 | 2008-02-10 Bastien Guerry <bzg@altern.org> |
| 53 | 60 | ||
| 54 | * mail/rmail.el (rmail-nonignored-headers): Allow to be nil. | 61 | * mail/rmail.el (rmail-nonignored-headers): Allow to be nil. |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 5937498073e..2ede11399af 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -231,6 +231,10 @@ Default value, nil, means edit the string instead." | |||
| 231 | :group 'basic-faces) | 231 | :group 'basic-faces) |
| 232 | (defvar isearch 'isearch) | 232 | (defvar isearch 'isearch) |
| 233 | 233 | ||
| 234 | (defface isearch-fail '((t (:foreground "Black" :background "Plum"))) | ||
| 235 | "Face for highlighting failed part in Isearch echo-area message." | ||
| 236 | :group 'isearch) | ||
| 237 | |||
| 234 | (defcustom isearch-lazy-highlight t | 238 | (defcustom isearch-lazy-highlight t |
| 235 | "*Controls the lazy-highlighting during incremental search. | 239 | "*Controls the lazy-highlighting during incremental search. |
| 236 | When non-nil, all text in the buffer matching the current search | 240 | When non-nil, all text in the buffer matching the current search |
| @@ -1955,21 +1959,22 @@ If there is no completion possible, say so and continue searching." | |||
| 1955 | (defun isearch-message (&optional c-q-hack ellipsis) | 1959 | (defun isearch-message (&optional c-q-hack ellipsis) |
| 1956 | ;; Generate and print the message string. | 1960 | ;; Generate and print the message string. |
| 1957 | (let ((cursor-in-echo-area ellipsis) | 1961 | (let ((cursor-in-echo-area ellipsis) |
| 1958 | (m (concat | 1962 | (cmds isearch-cmds) |
| 1963 | succ-msg m) | ||
| 1964 | (while (not (isearch-success-state (car cmds))) (pop cmds)) | ||
| 1965 | (setq succ-msg (and cmds (isearch-message-state (car cmds)))) | ||
| 1966 | (setq m (concat | ||
| 1959 | (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental) | 1967 | (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental) |
| 1960 | (if (and (not isearch-success) | 1968 | succ-msg |
| 1961 | (string-match " +$" isearch-message)) | 1969 | (and (not isearch-success) |
| 1962 | (concat | 1970 | (string-match (regexp-quote succ-msg) isearch-message) |
| 1963 | (substring isearch-message 0 (match-beginning 0)) | 1971 | (not (string= succ-msg isearch-message)) |
| 1964 | (propertize (substring isearch-message (match-beginning 0)) | 1972 | (propertize (substring isearch-message (match-end 0)) |
| 1965 | 'face 'trailing-whitespace)) | 1973 | 'face 'isearch-fail)))) |
| 1966 | isearch-message) | 1974 | (when (and (not isearch-success) (string-match " +$" m)) |
| 1967 | (isearch-message-suffix c-q-hack ellipsis) | 1975 | (put-text-property (match-beginning 0) (length m) 'face 'trailing-whitespace m)) |
| 1968 | ))) | 1976 | (setq m (concat m (isearch-message-suffix c-q-hack ellipsis))) |
| 1969 | (if c-q-hack | 1977 | (if c-q-hack m (let ((message-log-max nil)) (message "%s" m))))) |
| 1970 | m | ||
| 1971 | (let ((message-log-max nil)) | ||
| 1972 | (message "%s" m))))) | ||
| 1973 | 1978 | ||
| 1974 | (defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental) | 1979 | (defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental) |
| 1975 | ;; If about to search, and previous search regexp was invalid, | 1980 | ;; If about to search, and previous search regexp was invalid, |