GNU bug report logs - #57499
Documentation bug in the docstring of set-face-attribute?

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Wed, 31 Aug 2022 08:15:02 UTC

Severity: minor

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57499 <at> debbugs.gnu.org
Subject: Re: bug#57499: Documentation bug in the docstring of
 set-face-attribute?
Date: Wed, 31 Aug 2022 12:53:26 +0000
>
> Or let me turn the table and ask: what do you want to change in the 
> current doc string?  You want to tell that nil requires 2 calls, but 
> unspecified doesn't?
>

I see that this issue is repeatedly confusing users, so I would suggest 
something like:

If FRAME is nil, set the attributes for all existing frames, as well as 
the default for new frames.  If FRAME is t, change the default for new 
frames only.

To reset the value of some attribute to `unspecified', you must use 
'unspecified, not nil.

This seems both much clearer than what we have now, and more correct, 
given that as far as I can tell

(set-face-attribute 'some-face nil :some-attribute 'unspecified)

changes the face attribute to "unspecified" on existing and future frame, 
and

(set-face-attribute 'some-face t :some-attribute 'unspecified)

changes the face attribute to "unspecified" on future frames only.




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

Previous Next


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