unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-devel@gnu.org
Subject: Re: hi-lock and overlays
Date: Tue, 19 Jan 2010 08:41:35 +0100	[thread overview]
Message-ID: <87ska2tuc0.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <e01d8a51001181351x2d14f35fhbfea26150590c58f@mail.gmail.com> (Lennart Borgman's message of "Mon, 18 Jan 2010 22:51:23 +0100")

Lennart Borgman <lennart.borgman@gmail.com> writes:

Hi Lennart,

>> I was wrong with my previous mail.  The problem that hi-lock pattern
>> on the current line are not highlighted, when `hl-line-mode' is
>> enabled is not due to conflicting overlays.  The problem is that
>> hi-lock uses overlays only when the undocumented variable
>> `font-lock-fontified' is nil (see `hi-lock-set-pattern').  Else, it
>> uses normal fontification, and overlays (like the one for the current
>> line created by `hl-line-mode') take precedence over that.
>
>
> I would rather turn the question this way:
>
> - Why can't an overlay have a priority that is lower than text?

,----[ (info "(elisp)Overlay Properties") ]
| `priority'
|      This property's value (which should be a nonnegative integer
|      number) determines the priority of the overlay.  No priority, or
|      `nil', means zero.
| 
|      The priority matters when two or more overlays cover the same
|      character and both specify the same property; the one whose
|      `priority' value is larger overrides the other.  For the `face'
|      property, the higher priority overlay's value does not completely
|      override the other value; instead, its face attributes override
|      the face attributes of the lower priority `face' property.
| 
|      Currently, all overlays take priority over text properties.  Please
|      avoid using negative priority values, as we have not yet decided
|      just what they should mean.
`----

Hm, reading the last paragraph, this would be an option.  A negative
priority could be used to make text properties precede overlay
properties.

Anyway, the two other questions of my previous mail still stand.

Bye,
Tassilo




  reply	other threads:[~2010-01-19  7:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17 18:04 Conflicting overlays and the 'priority property Tassilo Horn
2010-01-18 21:33 ` hi-lock and overlays (was: Conflicting overlays and the 'priority property) Tassilo Horn
2010-01-18 21:51   ` Lennart Borgman
2010-01-19  7:41     ` Tassilo Horn [this message]
2010-01-20 15:54   ` hi-lock and overlays Stefan Monnier
2010-01-20 17:19     ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ska2tuc0.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).