From: Gregory Heytings <gregory@heytings.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 57499@debbugs.gnu.org
Subject: bug#57499: Documentation bug in the docstring of set-face-attribute?
Date: Wed, 31 Aug 2022 13:43:25 +0000 [thread overview]
Message-ID: <534c9018d2952b7a6bd0@heytings.org> (raw)
In-Reply-To: <83r10wsgu8.fsf@gnu.org>
>> 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.
>
> You consider this an improvement and clarification?
>
I'm not sure, but I think it is, yes.
>
> How many Lisp programmers even know about unspecified, let alone
> understand how it differs from nil?
>
Well, the next paragraph in the docstring says:
ARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a valid face
attribute name. All attributes can be set to `unspecified'; this fact is
not further mentioned below.
So we could even move the sentence there: To set an attribute to
`unspecified', the symbol 'unspecified must be used. Using nil may
produce the same effect in some cases, but is not guaranteed to work.
>
> This issue goes to the very intimate levels of the implementation
> details of face handling, and of how we merge their attributes so as to
> keep them independent on each frame. At the time, I thought that
> simplifying the issue, albeit at the price of telling half-lies, is the
> best we could do, so that users have a cookbook-type recipe that always
> works. It's quite possible that better ways of documenting this tricky
> aspect exist, but rest assured that just saying "unspecified, not nil"
> is not such a better way, because it leaves too many questions that beg
> answers.
>
Is that not a quarter-lie, which would be better than a half-lie?
In which cases is the above sentence still wrong? It seems to cover all
cases I can think of, frame = nil (in which case all frames are affected),
frame = t (in which case only future frames are affected) and frame = some
frame (in which case only that frame is affected).
next prev parent reply other threads:[~2022-08-31 13:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 8:14 bug#57499: Documentation bug in the docstring of set-face-attribute? Gregory Heytings
2022-08-31 8:17 ` Gregory Heytings
2022-08-31 11:11 ` Eli Zaretskii
2022-08-31 12:04 ` Gregory Heytings
2022-08-31 12:39 ` Eli Zaretskii
2022-08-31 12:53 ` Gregory Heytings
2022-08-31 13:06 ` Eli Zaretskii
2022-08-31 13:43 ` Gregory Heytings [this message]
2022-08-31 16:11 ` Eli Zaretskii
2022-08-31 18:33 ` Gregory Heytings
2022-08-31 19:13 ` Eli Zaretskii
2022-08-31 19:33 ` Gregory Heytings
2022-08-31 19:49 ` Eli Zaretskii
2022-08-31 21:13 ` Gregory Heytings
2022-09-01 7:04 ` Eli Zaretskii
2022-09-01 8:25 ` Gregory Heytings
2022-09-01 8:44 ` Eli Zaretskii
2022-09-01 9:02 ` Gregory Heytings
2022-09-01 11:33 ` Eli Zaretskii
2022-09-01 11:56 ` Gregory Heytings
2022-09-01 12:08 ` Eli Zaretskii
2022-09-01 13:15 ` Gregory Heytings
2022-09-01 14:56 ` Eli Zaretskii
2022-09-01 17:07 ` Gregory Heytings
2022-09-01 18:24 ` Eli Zaretskii
2022-09-01 19:35 ` Gregory Heytings
2022-09-02 16:00 ` Eli Zaretskii
2022-09-02 20:48 ` Gregory Heytings
2022-09-03 6:00 ` Eli Zaretskii
2022-09-03 6:43 ` Gregory Heytings
2022-09-03 1:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=534c9018d2952b7a6bd0@heytings.org \
--to=gregory@heytings.org \
--cc=57499@debbugs.gnu.org \
--cc=eliz@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).