From: Visuwesh <visuweshm@gmail.com>
To: 55623@debbugs.gnu.org
Subject: bug#55623: 29.0.50; Mention that (face-foreground 'default) can return "unspecified-fg"
Date: Wed, 25 May 2022 11:09:04 +0530 [thread overview]
Message-ID: <87ilpub287.fsf@gmail.com> (raw)
In a tty frame and when using a theme that does not explicitly set the
default face's :foreground/:background [1], (face-attribute 'default :foreground)
returns "unspecified-fg". This value is surprising when the docstring
of `face-attribute' says,
To ensure that the return value is always specified and absolute, use a
value of ‘default’ for INHERIT; this will resolve any unspecified or
relative values by merging with the ‘default’ face (which is always
completely specified). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^
I opened the Elisp manual and tried to isearch for "unspecified-fg", but
it got me no matches. It would be nice if this return value was
documented somewhere.
[1] If I use the adwaita theme instead, then `face-foreground' does
indeed return a colour.
P.S. I'm filing this bug report after this was brought up in
https://github.com/alphapapa/ement.el/issues/34#issuecomment-906893756.
next reply other threads:[~2022-05-25 5:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 5:39 Visuwesh [this message]
2022-05-25 7:17 ` bug#55623: 29.0.50; Mention that (face-foreground 'default) can return "unspecified-fg" Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-25 7:53 ` Visuwesh
2022-05-25 13:18 ` Eli Zaretskii
2022-05-25 14:57 ` Visuwesh
2022-05-25 17:07 ` Eli Zaretskii
2022-05-25 17:22 ` Visuwesh
2022-05-25 17:37 ` Eli Zaretskii
2022-05-27 5:44 ` Adam Porter
2022-05-27 6:34 ` Eli Zaretskii
2022-05-27 7:27 ` Adam Porter
2022-06-28 21:37 ` Stefan Kangas
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=87ilpub287.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=55623@debbugs.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).