From: Dave Goel <deego3@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Faces: How to clear an attribute while continuing to inherit other attributes?
Date: Thu, 10 Oct 2019 14:26:02 -0400 [thread overview]
Message-ID: <CAOCW0DiBpy+c_A8BUMxV2jp9kQzjPRRKZisn36B9xFaG9s2tsg@mail.gmail.com> (raw)
In-Reply-To: <83pnj4qxsd.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
> Not if your code does
> (set-face-foreground FACE (face-foreground 'default))
> With this, if the default face changes the color, FACE will follow
suit.
I don't see that at all here in my emacs24:
(progn
(defface a nil "")
(defface b nil "")
(set-face-attribute 'b nil :foreground "yellow")
(set-face-attribute 'a nil :inherit 'b)
(set-face-foreground 'a (face-foreground 'default))
;; let's chase how 'a would render:
(let
((init (face-attribute 'a :foreground nil t))
final)
(set-face-foreground 'default "pink")
(setq final (face-attribute 'a :foreground nil t))
(message "%S %S" init final)))
"\"white\" \"white\""
Per your assertion, the message should have been: white, pink.
Also, your point seems to be: We shouldn't allow nil (to clear
inheritances) for :fg and :bg (unlike for other faces) because: "*we only
allow strings*". I don't get that logic.
[-- Attachment #2: Type: text/html, Size: 1868 bytes --]
next prev parent reply other threads:[~2019-10-10 18:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 2:42 Faces: How to clear an attribute while continuing to inherit other attributes? Dave Goel
2019-10-10 8:09 ` Eli Zaretskii
2019-10-10 15:56 ` Dave Goel
2019-10-10 15:59 ` Dave Goel
2019-10-10 17:37 ` Eli Zaretskii
2019-10-10 17:50 ` Dave Goel
2019-10-10 18:07 ` Eli Zaretskii
2019-10-10 18:26 ` Dave Goel [this message]
2019-10-10 18:39 ` Eli Zaretskii
[not found] ` <47578dbd-71ea-cb02-c337-96fb18af1915@lanl.gov>
[not found] ` <83k19cqvdi.fsf@gnu.org>
2019-10-11 0:56 ` Dave Goel
2019-10-11 1:13 ` Dave Goel
2019-10-11 8:37 ` Eli Zaretskii
2019-10-11 8:36 ` Eli Zaretskii
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=CAOCW0DiBpy+c_A8BUMxV2jp9kQzjPRRKZisn36B9xFaG9s2tsg@mail.gmail.com \
--to=deego3@gmail.com \
--cc=eliz@gnu.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 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.