all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Can an overlay have a non-overriding face?
Date: Mon, 12 Sep 2016 20:03:08 +0300	[thread overview]
Message-ID: <83d1k99hkj.fsf@gnu.org> (raw)
In-Reply-To: <87d1k9x3h9.fsf@gmail.com> (message from Alex on Sun, 11 Sep 2016 20:21:22 -0600)

> From: Alex <agrambot@gmail.com>
> Date: Sun, 11 Sep 2016 20:21:22 -0600
> 
> Suppose there are two overlays A and B. Is it possible for overlay A to
> have a higher priority than B yet for the face (or any arbitrary
> property) property to not override B's?

As the ELisp manual says, faces do not override each other, they are
merged:

     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.

IOW, only the same attributes in the lower-priority overlay's face are
overridden, the rest of that face's attributes are kept.

> If not, would that be a reasonable feature request? Currently I made a
> workaround where I copy overlay A, lower its priority, and then put the
> face on that overlay.
> 
> It would be nice if that wasn't necessary.

Depends on the use case.  Please file a feature request, and please
describe your use cases there.

Thanks.



      reply	other threads:[~2016-09-12 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12  2:21 Can an overlay have a non-overriding face? Alex
2016-09-12 17:03 ` Eli Zaretskii [this message]

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

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

  git send-email \
    --in-reply-to=83d1k99hkj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.