emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hi-lock and overlays


From: Tassilo Horn
Subject: Re: hi-lock and overlays
Date: Wed, 20 Jan 2010 18:19:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>   - Why does hi-lock use two different styles of highlighting?  IMO, if
>>     a user does M-x highlight-regexp RET foo RET hi-yellow RET, he
>>     expects to get that highlighting even if there are other overlays,
>>     so creating an overlay (and maybe even setting a priority) is the
>>     only safe bet.
>
> overlays are implemented inefficiently, so if you have many of them,
> redisplay, buffer modifications, and other operations can become
> noticeably slower.

I see, but still I think that deciding between font-lock and overlays by
the value of `font-lock-fontified' is weird, and I'd vote for an
optional parameter that lets one specify the method to be used
explicitly.  What do yau think?

Ok, back to the original problem that hl-line-mode's overlay supresses
the font-lock highlighting added by hi-lock.  The cleanest solution
seems to be to decide on the usage of negative overlay priorities to
make font-lock take precedence here, and hl-line-mode's overlay would
use one.  But I don't know how feasible that is.

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]