[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlight failed part of isearch input
From: |
Juri Linkov |
Subject: |
Re: highlight failed part of isearch input |
Date: |
Sat, 23 Feb 2008 21:47:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>>> > The patch was apparently never applied. It highlights the
>>>> > part of your isearch input that fails to match.
>>>>
>>>> Did you fix all problems? I remember there were some rough edges.
>>>
>>> As I said, it also incorporates the comments following Richard's email.
>>
>> I tested it and it looks fine.
>>
>> I applied the patch before reading Juri's email, so Juri please check
>> and let me know if you think it is okay.
>
> There is one regression after installing this patch: `C-s M-p' now
> doesn't put the previous search string from the search ring to the
> isearch minibuffer.
The patch below fixes this problem. When the first message from the
isearch-cmds stack is not the same as isearch-message (this happens when
isearch-edit-string sets a different value) then it uses this value
for succ-msg.
Also this patch uses a better background color for the
`isearch-fail' face - the same color as used by Firefox
for the background of the failed search text. UI designers
of Firefox made a good job and this color looks nice.
Index: lisp/isearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.310
diff -c -r1.310 isearch.el
*** lisp/isearch.el 12 Feb 2008 00:50:44 -0000 1.310
--- lisp/isearch.el 23 Feb 2008 19:46:51 -0000
***************
*** 231,238 ****
:group 'basic-faces)
(defvar isearch 'isearch)
! (defface isearch-fail '((t (:foreground "Black" :background "Plum")))
"Face for highlighting failed part in Isearch echo-area message."
:group 'isearch)
(defcustom isearch-lazy-highlight t
--- 231,245 ----
:group 'basic-faces)
(defvar isearch 'isearch)
! (defface isearch-fail
! '((((class color) (min-colors 88))
! (:background "IndianRed1"))
! (((class color) (min-colors 16))
! (:background "red"))
! (((class color) (min-colors 8))
! (:background "red")))
"Face for highlighting failed part in Isearch echo-area message."
+ :version "23.1"
:group 'isearch)
(defcustom isearch-lazy-highlight t
***************
*** 1962,1968 ****
(cmds isearch-cmds)
succ-msg m)
(while (not (isearch-success-state (car cmds))) (pop cmds))
! (setq succ-msg (and cmds (isearch-message-state (car cmds))))
(setq m (concat
(isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
succ-msg
--- 1972,1981 ----
(cmds isearch-cmds)
succ-msg m)
(while (not (isearch-success-state (car cmds))) (pop cmds))
! (setq succ-msg
! (if (equal (isearch-message-state (car isearch-cmds))
isearch-message)
! (and cmds (isearch-message-state (car cmds)))
! isearch-message))
(setq m (concat
(isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
succ-msg
--
Juri Linkov
http://www.jurta.org/emacs/
- RE: highlight failed part of isearch input, Drew Adams, 2008/02/11
- Re: highlight failed part of isearch input, Juri Linkov, 2008/02/11
- RE: highlight failed part of isearch input, Drew Adams, 2008/02/11
- Re: highlight failed part of isearch input, Bastien, 2008/02/11
- Re: highlight failed part of isearch input, Juri Linkov, 2008/02/16
- Re: highlight failed part of isearch input,
Juri Linkov <=
- RE: highlight failed part of isearch input, Drew Adams, 2008/02/23
- Re: highlight failed part of isearch input, Juri Linkov, 2008/02/23
- RE: highlight failed part of isearch input, Drew Adams, 2008/02/23
- Re: highlight failed part of isearch input, Juri Linkov, 2008/02/24
- RE: highlight failed part of isearch input, Drew Adams, 2008/02/24
- Re: highlight failed part of isearch input, Juri Linkov, 2008/02/24
- Re: highlight failed part of isearch input, Bastien, 2008/02/25
- Re: highlight failed part of isearch input, Dan Nicolaescu, 2008/02/24
- RE: highlight failed part of isearch input, Drew Adams, 2008/02/24
- Re: highlight failed part of isearch input, Jason Rumney, 2008/02/24