unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Overriding inherited face attributes
Date: Thu, 29 Nov 2018 09:14:52 +0200	[thread overview]
Message-ID: <83ftvke4nn.fsf@gnu.org> (raw)
In-Reply-To: <875zwg28ek.fsf@rub.de> (message from Stephen Berman on Wed, 28 Nov 2018 22:34:43 +0100)

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 28 Nov 2018 22:34:43 +0100
> 
> > So this is only about what propertize does?  And only when some of the
> > later properties override earlier ones?
> 
> Well, it's at least about what propertize does, since that was the OP's
> example (the first form above), which lead to my observation of the
> difference with the second form.

My reading of the code is that later face attributes override the
earlier once, i.e. the attributes are processed in order, and :inherit
doesn't have any precedence in this case.  Which seems like a sensible
thing, but I'm not sure we want to document this implementation
detail.  In general, having conflicting face attributes in the face
definition is not a good idea anyway; the only sensible use case is
when you want to change (i.e. override) some attribute of an existing
face, and for that, putting the overriding attribute at the end is the
natural thing to do.  IOW, Emacs seems to do what users should expect.



  reply	other threads:[~2018-11-29  7:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 20:18 Overriding inherited face attributes Boris Buliga
2018-11-27 21:33 ` Stephen Berman
2018-11-28  6:19   ` Eli Zaretskii
2018-11-28 12:24     ` Stephen Berman
2018-11-28 13:06       ` Eli Zaretskii
2018-11-28 13:13         ` Stephen Berman
2018-11-28 16:18           ` Eli Zaretskii
2018-11-28 20:01             ` Stephen Berman
2018-11-28 20:35               ` Eli Zaretskii
2018-11-28 21:34                 ` Stephen Berman
2018-11-29  7:14                   ` Eli Zaretskii [this message]
2018-11-29 17:30                     ` Stephen Berman
2018-11-28 21:44                 ` Boris Buliga
2018-11-29  7:08                   ` Eli Zaretskii
2018-11-28  7:39   ` Boris Buliga
2018-11-28  7:51     ` Eli Zaretskii
2018-11-28  8:42       ` Boris Buliga

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=83ftvke4nn.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.
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).