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 21:24:59 +0300 Message-ID: <83k06nq7es.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> <834jxrscu7.fsf@gnu.org> <831qsvs51j.fsf@gnu.org> <83sflbqotm.fsf@gnu.org> <83r10vqh29.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38077"; 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 20:42:37 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 1oTp9A-0009i2-NO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Sep 2022 20:42:36 +0200 Original-Received: from localhost ([::1]:47080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTp99-0000fh-Ez for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Sep 2022 14:42:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTosA-0007hk-3h for bug-gnu-emacs@gnu.org; Thu, 01 Sep 2022 14:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54386) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTos9-0008Kg-Rg for bug-gnu-emacs@gnu.org; Thu, 01 Sep 2022 14:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTos9-0005H6-Ja for bug-gnu-emacs@gnu.org; Thu, 01 Sep 2022 14:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Sep 2022 18:25: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-done@debbugs.gnu.org id=D57499.166205669020255 (code D ref 57499); Thu, 01 Sep 2022 18:25:01 +0000 Original-Received: (at 57499-done) by debbugs.gnu.org; 1 Sep 2022 18:24:50 +0000 Original-Received: from localhost ([127.0.0.1]:44135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTort-0005GZ-Kk for submit@debbugs.gnu.org; Thu, 01 Sep 2022 14:24:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTorn-0005GI-TY for 57499-done@debbugs.gnu.org; Thu, 01 Sep 2022 14:24:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTorh-0008FZ-KZ; Thu, 01 Sep 2022 14:24:33 -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=YDOkbXRDd6yxo+g6GOD3l+5FS+QlzrjY7VVdppK6AcU=; b=KghqKs71fSX8 VCNVYLDVam8s5XOkftJ3p7ORJT6Al9fF1ooY2SYib2MTsa672M7zPcvoamdp9a4aYVydiB/CQ7N6B qW1xy9d6+tp26eEgtq4KNTdPqArUdXoNjumbQ1UajD1Q7OtGlhhB/CsiPdWJTPojhMCuFvKiU91HK l6YoQ3P0OB107StxY+xQM2aXv8cFJaGMvRdH6yjxti8SUGMlfugyxCvs2hzQiPrAPEXwE328qQnr0 i2B7oyOUOizHR9YuG6XHMQlHkTvICNj3wvMkHFzzAznbYNuLYBoFgQu/H8kWZsVv4oeCfqZLnGDC7 Z7F8s2qdwiVzCrtDHDf1sA==; Original-Received: from [87.69.77.57] (port=1771 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 1oTorf-0000up-HR; Thu, 01 Sep 2022 14:24:33 -0400 In-Reply-To: (message from Gregory Heytings on Thu, 01 Sep 2022 17:07:13 +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:241270 Archived-At: > Date: Thu, 01 Sep 2022 17:07:13 +0000 > From: Gregory Heytings > cc: 57499-done@debbugs.gnu.org > > +--- > +** The value nil is now deprecated for some face attributes. > +The face attributes :background, :foreground and :distant-foreground > +could be given a value nil for backward-compatibility with Emacs 20. > +This is now deprecated, the 'unspecified value should be used instead. It isn't deprecated, it's invalid. There's no need to have anything like this in NEWS, because all our documentation says the color attributes can have only string values (in addition to 'unspecified'). > +#define HANDLE_INVALID_OR_DEPRECATED_NIL_VALUE(A) \ > + if (NILP (value)) \ > + { \ > + if (EQ (frame, Qt)) \ > + add_to_log ("Warning: invalid value nil for attribute `%s' " \ > + "with frame t or nil: use 'unspecified instead of " \ > + "nil", A); \ > + else \ > + add_to_log ("Warning: using value nil for attribute `%s' is " \ > + "deprecated: use 'unspecified instead of nil", A); \ > + /* Compatibility with 20.x. */ \ > + value = Qunspecified; \ No need to differentiate between FRAME = t and the other cases. And the message text should just say Warning: nil value for `%s' is invalid, use 'unspecified instead.