GNU bug report logs -
#6227
Color isearch regexp submatches differently
Previous Next
Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>
Date: Thu, 20 May 2010 11:13:01 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Sun, May 23, 2010 at 1:44 AM, Juri Linkov <juri <at> jurta.org> wrote:
>>> We already have highlighting like that: lisp/emacs-lisp/re-builder.el
>>> uses faces `reb-match-1', `reb-match-2', `reb-match-3' to highlight
>>> regexp subexpressions. I think this should be used by isearch.
>>
>> That sounds right to me.
>>
>> Also Drew suggestion to not color submatches in lazy marking seems right.
>
> (add-hook 'isearch-update-post-hook
> (lambda ()
> (require 're-builder)
> (when isearch-regexp
> (let ((reb-regexp isearch-string)
> (reb-target-buffer (current-buffer))
> (reb-target-window (selected-window)))
> (reb-update-overlays)))))
>
> (add-hook 'isearch-mode-end-hook
> (lambda ()
> (let ((reb-target-buffer (current-buffer)))
> (reb-delete-overlays))))
Nice. So I suggest moving (and renaming) `reb-count-subexps' to
isearch.el and splitting off the marking of one overlay from
`reb-update-overlays' and moving that too to isearch.el (since
isearch.el) is probably always loaded for a normal Emacs user).
This bug report was last modified 4 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.