bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13718: [patch] prevents hl-line from overriding highlight-mode


From: Stefan Monnier
Subject: bug#13718: [patch] prevents hl-line from overriding highlight-mode
Date: Fri, 15 Feb 2013 12:30:48 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> hl-line seems to leave its overlay's priority unspecified (good!), which
>> means that it should take precedence over overlays which are larger
>> (e.g. span multiple lines) while smaller overlays within the current
>> line should take precedence over it.

> That's actually a reasonable alternative to my hard-coded solution,
> but the problem is that it doesn't seem to work in every case: when I
> open a file that has syntax highlighting (e.g. Bash or Python) and
> then use highlight-phrase/regexp, the global-hl-line will have higher
> priority than the highlight, no matter what the size of the highlight
> is.  If I do the same thing in text-mode, the problem does not occur.
> (This was tested on 24.2.1-i386-mingw-nt6.1.7601  without any custom
> configuration.)

That's a different issue: in most major modes, font-lock will be enable,
in which case hi-lock uses it, which implies that hi-lock will use
text-properties instead of overlays.  And text-properties always have
lower priority than overlays.
Problem is: in such a case, not only you do have a problem, but your
patch should make no difference, so overlays always take priority over
text-properties, no matter the value of the `priority' property.

IOW, are you sure your patch fixes the problem for you?


        Stefan





reply via email to

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