GNU bug report logs - #55623
29.0.50; Mention that (face-foreground 'default) can return "unspecified-fg"

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Wed, 25 May 2022 05:40:02 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: Po Lu <luangruo <at> yahoo.com>, 55623 <at> debbugs.gnu.org
Subject: Re: bug#55623: 29.0.50; Mention that (face-foreground 'default) can
 return "unspecified-fg"
Date: Wed, 25 May 2022 13:23:09 +0530
[புதன் மே 25, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Visuwesh <visuweshm <at> gmail.com> writes:
>
>> 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.
>
> Isn't that a special color which means to use the terminal's default
> foreground (and/or background, in the case of unspecified-bg) colors?
>
> If so, it should be documented as that instead.

Indeed, "unspecified-fg/bg" means to use the terminal's default fg/bg.
But AFAICT, it is not specified in the manual anywhere.




This bug report was last modified 2 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.