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 08:17:15 +0000 Message-ID: <534c9018d254f4320097@heytings.org> References: <534c9018d2adffda3e53@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6656"; mail-complaints-to="usenet@ciao.gmane.io" To: 57499@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 31 10:18:17 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 1oTIvR-0001aJ-Iz for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 10:18:17 +0200 Original-Received: from localhost ([::1]:60018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTIvQ-0000Su-Cv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 04:18:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTIvC-0000S3-Bj for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 04:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTIvC-00044n-2l for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 04:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTIvB-0004Zi-UT for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 04:18:01 -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 08:18:01 +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.166193383917526 (code B ref 57499); Wed, 31 Aug 2022 08:18:01 +0000 Original-Received: (at 57499) by debbugs.gnu.org; 31 Aug 2022 08:17:19 +0000 Original-Received: from localhost ([127.0.0.1]:38144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTIuV-0004Yb-16 for submit@debbugs.gnu.org; Wed, 31 Aug 2022 04:17:19 -0400 Original-Received: from heytings.org ([95.142.160.155]:48454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTIuS-0004YS-Qh for 57499@debbugs.gnu.org; Wed, 31 Aug 2022 04:17:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1661933835; bh=/0vV9FCBdnHI1i7fTu7Y2x+JRCXsQS5RHeADrilQTQ4=; h=Date:From:To:Subject:In-Reply-To:Message-ID:References:From; b=pzzWTyFhtufC/kT9ILwC4rFyUFWJ0/q1tzTsnqrLLB6jLJcRKdch+9oSY50TxOIPY 2+3l5+jCceQhdaBQd2wfmev3OR4TxS7qE5k2dMH1cYv8+cqg6i3AOtvG26ZXHuqXlm UGIyL+vQJm7QNxFGtEkJlTKxUcwWl8hZC0ww1A68DYlFXipjVP3LngihFJMDue4yoC vV8a+39Amj8TDvUzdl0e7VCpXGfDJewjNROPZRpwE2z7N1/WkzAT09/UGfBd83Epih so9fGglMkGCxD0Onbf2XLzY7Kw7y3PrqV7l3PE++K8Sk/a+UsRPzBH2uGlRl14sciU dGD48HHi1bUoQ== In-Reply-To: <534c9018d2adffda3e53@heytings.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:241170 Archived-At: [Sorry, my previous post was incomplete.] > > The docstring of set-face-attribute says: > > "As an exception, to reset the value of some attribute to `unspecified' > in a way that overrides the non-`unspecified' value defined by the > face's spec in `defface', for new frames, you must explicitly call this > function with FRAME set to t and the attribute's value set to > `unspecified'; just using FRAME of nil will not affect new frames in > this case." > > Not only is that sentence hard to parse, it also seems wrong. > > Can someone come up with a scenario in which a call > > (set-face-attribute 'some-face nil :some-attribute 'unspecified) > > only affects existing frames? In my testing it affects all frames > (existing and future ones), and that's also what the code seems to do: > set-face-attribute sets where to 0 when frame is nil, and calls > internal-set-face-attribute > with frame = 0, which according to the docstring of internal-set-lisp-face-attribute "means change the face on all frames, and change the default for new frames".