From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57499: Documentation bug in the docstring of set-face-attribute? Date: Thu, 01 Sep 2022 11:44:48 +0300 Message-ID: <834jxrscu7.fsf@gnu.org> References: <534c9018d2adffda3e53@heytings.org> <831qswu0p4.fsf@gnu.org> <534c9018d2f372cd7462@heytings.org> <83tu5ssi35.fsf@gnu.org> <534c9018d222586a161c@heytings.org> <83r10wsgu8.fsf@gnu.org> <534c9018d2952b7a6bd0@heytings.org> <83pmggs89x.fsf@gnu.org> <534c9018d2597d4fd752@heytings.org> <83fshcrzth.fsf@gnu.org> <534c9018d2c911550778@heytings.org> <83czcgry5f.fsf@gnu.org> <534c9018d2f901e88b93@heytings.org> <837d2nshh7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23340"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57499-done@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 01 11:16:29 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 1oTgJI-0005rs-Gp for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Sep 2022 11:16:28 +0200 Original-Received: from localhost ([::1]:59142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTgJH-0006uD-BY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Sep 2022 05:16:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTfot-0007ss-UY for bug-gnu-emacs@gnu.org; Thu, 01 Sep 2022 04:45:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTfos-000335-N2 for bug-gnu-emacs@gnu.org; Thu, 01 Sep 2022 04:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTfos-0007qg-Hy for bug-gnu-emacs@gnu.org; Thu, 01 Sep 2022 04:45:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Sep 2022 08:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 57499 X-GNU-PR-Package: emacs Mail-Followup-To: 57499@debbugs.gnu.org, eliz@gnu.org, gregory@heytings.org Original-Received: via spool by 57499-done@debbugs.gnu.org id=D57499.166202187330111 (code D ref 57499); Thu, 01 Sep 2022 08:45:02 +0000 Original-Received: (at 57499-done) by debbugs.gnu.org; 1 Sep 2022 08:44:33 +0000 Original-Received: from localhost ([127.0.0.1]:41137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTfoO-0007pb-UC for submit@debbugs.gnu.org; Thu, 01 Sep 2022 04:44:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTfoJ-0007pL-Uj for 57499-done@debbugs.gnu.org; Thu, 01 Sep 2022 04:44:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTfoE-0002yu-EG; Thu, 01 Sep 2022 04:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=eGRwlKbP9mnR8azHzxaVG0p0mrUZuaOJLyZy6ggQoYc=; b=Ohb+mL3oN47c JcT6tXLN8krXT4jGfYThP+Vc6EOc1QCWuHE31CClgAS0rViKbIokbjIqmuoMtd+i3Plyufl4P1+Lb j3RrxjUmoRmU2HP1d7t/omw608oCljtfkdrDX1E96hx5FQKpaOR8OyDoffv7Ws9ReoS3IviZxj8UM F9mAkTufyMma4MJberJTp6BveEshGhssUpcX/L/b2tXq/JqAAWuBgzU6nD5k7PmaqtGaJaQeormjo 0MfJ0D2JptblT0udm27rQl73LCtRS0nU7VFImY0BbmVUJpKnDw8zNsyqUSrbeBBUQj6mUB66YLeDy ZxTRDtTAliITqEW8mC/2dQ==; Original-Received: from [87.69.77.57] (port=2169 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTfoD-0002iq-Nk; Thu, 01 Sep 2022 04:44:22 -0400 In-Reply-To: (message from Gregory Heytings on Thu, 01 Sep 2022 08:25:35 +0000) 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:241240 Archived-At: > Date: Thu, 01 Sep 2022 08:25:35 +0000 > From: Gregory Heytings > cc: 57499@debbugs.gnu.org > > >> I just want to make it as clear as possible that to get that special > >> value `unspecified' one should use the symbol 'unspecified. > > > > We have gazillions of such situations everywhere in Emacs where symbol > > values are documented, and we never say anything beyond the name of the > > symbol with proper quoting. > > For some reason this situation seems different (from a user point of > view), give that the same question pops again and again. Why is adding > such a note a problem? Because we don't say anything like that anywhere else. > And when one calls > > (set-face-attribute 'isearch t :background 'unspecified) > > this is what is happening: > > (internal-set-lisp-face-attributes 'isearch :background 'unspecified t) > > So this call is already included in the previous one. Why should we tell > users to add such a redundant call in their code? The new text doesn't say the call with FRAM = t should be an additional call. > As far as I understand, the actual and real problem here is some users use > nil when they should use 'unspecified, because they are not aware that nil > and 'unspecified are subtly different. The subtle difference is that > using nil works for frame = # ... #, but does not work > with frame = t. That is a backward-compatibility feature that I don't want to mention in the doc string. Lisp programs should only use valid values that are documented in the doc string. > > When a new frame is created, attribute values in the FACE's `defspec' > > normally override the `unspecified' values in the FACE's default > > attributes. To avoid that, i.e. to cause ATTRIBUTE's value be reset to > > `unspecified' when creating new frames, disregarding what the FACE's > > face spec says, call this function with FRAME set to t and the > > ATTRIBUTE's value set to `unspecified'. > > See above: I really don't understand why the 'unspecified value should be > detailed as if it were different from the other values, when in fact it > isn't. The real and actual problem here is that users are confused by the > fact that a nil value for an attribute is equivalent to an 'unspecified > value for existing frames, but is not equivalent to 'unspecified for new > frames. I give up. I've installed the last text I proposed, and I'm closing this bug with that.