[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6227: Color isearch regexp submatches differently
From: |
Lennart Borgman |
Subject: |
bug#6227: Color isearch regexp submatches differently |
Date: |
Thu, 10 Jun 2010 23:41:40 +0200 |
On Thu, Jun 10, 2010 at 10:52 PM, Juri Linkov <juri@jurta.org> wrote:
>>> I agree, your approach is probably better. But check for more
>>> submatches. Maybe upto the value of some variable, say
>>> isearch-max-submatch-num.
>>
>> Good idea.
>
> Maybe something like this:
Yes,
> +(defcustom search-highlight-submatches 0
but set I suggest a default of 100. The loop costs essentially nothing
for non-submatches and this is on command level.
> + (let ((i 0) ov)
> + (while (<= i search-highlight-submatches)
> + (when (match-beginning i)
> + (setq ov (make-overlay (match-beginning i) (match-end i)))
> + (overlay-put ov 'face (intern-soft (format "isearch-%d" i)))
> + (overlay-put ov 'priority 1002)
> + (push ov isearch-submatches-overlays))
> + (setq i (1+ i))))))
- bug#6227: Color isearch regexp submatches differently, Lennart Borgman, 2010/06/08
- bug#6227: Color isearch regexp submatches differently, Juri Linkov, 2010/06/09
- bug#6227: Color isearch regexp submatches differently, Lennart Borgman, 2010/06/09
- bug#6227: Color isearch regexp submatches differently, Juri Linkov, 2010/06/10
- bug#6227: Color isearch regexp submatches differently, Lennart Borgman, 2010/06/10
- bug#6227: Color isearch regexp submatches differently, Juri Linkov, 2010/06/10
- bug#6227: Color isearch regexp submatches differently,
Lennart Borgman <=
- bug#6227: Color isearch regexp submatches differently, Stefan Monnier, 2010/06/10
- bug#6227: Color isearch regexp submatches differently, Juri Linkov, 2010/06/11