unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: bad interaction of face-spec-set and customize-face
Date: Sun, 02 Mar 2008 12:25:25 -0500	[thread overview]
Message-ID: <E1JVrwD-0002RL-Qw@fencepost.gnu.org> (raw)
In-Reply-To: <4w8x126q0m.fsf@fencepost.gnu.org> (message from Glenn Morris on Sat, 01 Mar 2008 17:25:13 -0500)

    emacs -Q
    (face-spec-set 'font-lock-comment-face
			'((t (:foreground "OrangeRed"))))
    M-x customize-face font-lock-comment-face
    Change foreground to blue
    "Set for current session"
      -> face does not change

This is not a bug.

A few months ago I made an effort to clean up the relationship between
face atttributes and customization.

Whatever you set with customization acts like a change
to the defface.

Attribute values that you set with face-spec-set (with FOR-DEFFACE =
nil) take precedence over the defface (and over customization).

The idea is that programs should set attributes with face-spec-set,
while users should set them with Custom (or with face-spec-set specifying
FOR-DEFFACE = t).

So this is not a bug, but it could be useful for the Set operation in
Custom to warn you that the face has an override which may cause your
changes not to be visible.  It could also have an operation to get rid
of that offerride by doing (face-spec-set FACE nil).

I did not finish rationalizing this whole area.  In particular, it is
not clear how `set-face-attribute' should interact with
`face-spec-set' and with Custom.  This needs more thinking.





  reply	other threads:[~2008-03-02 17:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01 22:25 bad interaction of face-spec-set and customize-face Glenn Morris
2008-03-02 17:25 ` Richard Stallman [this message]
2008-03-03  9:11   ` Glenn Morris

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=E1JVrwD-0002RL-Qw@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@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).