From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#57499: Documentation bug in the docstring of set-face-attribute? Date: Wed, 31 Aug 2022 13:43:25 +0000 Message-ID: <534c9018d2952b7a6bd0@heytings.org> References: <534c9018d2adffda3e53@heytings.org> <831qswu0p4.fsf@gnu.org> <534c9018d2f372cd7462@heytings.org> <83tu5ssi35.fsf@gnu.org> <534c9018d222586a161c@heytings.org> <83r10wsgu8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57499@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 31 15:44:24 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTO11-0009Bk-PX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 15:44:23 +0200 Original-Received: from localhost ([::1]:60364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTO10-0003ut-CE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 09:44:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTO0h-0003uO-S5 for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 09:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTO0g-0001dZ-Dd for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 09:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTO0g-0002y4-9U for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 09:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Aug 2022 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57499 X-GNU-PR-Package: emacs Original-Received: via spool by 57499-submit@debbugs.gnu.org id=B57499.166195341011346 (code B ref 57499); Wed, 31 Aug 2022 13:44:02 +0000 Original-Received: (at 57499) by debbugs.gnu.org; 31 Aug 2022 13:43:30 +0000 Original-Received: from localhost ([127.0.0.1]:38563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTO09-0002ww-Vj for submit@debbugs.gnu.org; Wed, 31 Aug 2022 09:43:30 -0400 Original-Received: from heytings.org ([95.142.160.155]:48854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTO07-0002wl-EA for 57499@debbugs.gnu.org; Wed, 31 Aug 2022 09:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661953406; bh=VAFI7R7fiVnuMeIUcfn5rhaA1Sbw1hz/Oanl49sceYE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=zCUTE5V4ILi3sEFRPwB5RPM+rw6fAlYR1jDFWzeQsVdVZym7RzbTOUr5OtbcYRB2h 1m3L0Hg9gzvz0R4mCYB9fr1vWz5K6EZ3RKUtx1wh88epM4LxcScNcMNyXejNcPQRZP CMUk7VCKmsJ27mskF+8HerSP/00nNyLbUSsK7uzNobSIJSMC05yVk7rhY9sXtpNlJN y2BwPwz86aDIuXhrg+agF8WFdfbJ2RukLv8lzVn3hBdt5ScXkxYSL1uiMhqFr4FSPA LK3g30V8OHdTA7pQbeMhOLhLEDnhPJT8URJ/K4uIYx+HWOBufb1QhKpugpE+W0MCL3 YwrJS83kMzeKA== In-Reply-To: <83r10wsgu8.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241198 Archived-At: >> 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).