From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Ponce Newsgroups: gmane.emacs.bugs Subject: bug#57652: 29.0.50; Warning setting attribute of face =?UTF-8?Q?=E2=80=98term=E2=80=99?= Date: Thu, 8 Sep 2022 10:22:31 +0200 Message-ID: <319e3926-7c22-cabd-43dd-a02f3a01c734@orange.fr> References: <5f92d116-3cfd-e4b4-0caf-b2337fa1bd7f@orange.fr> <878rmua277.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24055"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Cc: 57652@debbugs.gnu.org, gregory@heytings.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 08 10:23: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 1oWCor-00063B-D6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 10:23:29 +0200 Original-Received: from localhost ([::1]:60276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWCoq-00017G-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 04:23:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWCoR-00016t-02 for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 04:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWCoQ-000094-No for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 04:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWCoQ-0006FT-J7 for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 04:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Sep 2022 08:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57652 X-GNU-PR-Package: emacs Original-Received: via spool by 57652-submit@debbugs.gnu.org id=B57652.166262535523970 (code B ref 57652); Thu, 08 Sep 2022 08:23:02 +0000 Original-Received: (at 57652) by debbugs.gnu.org; 8 Sep 2022 08:22:35 +0000 Original-Received: from localhost ([127.0.0.1]:57164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWCnz-0006EY-7b for submit@debbugs.gnu.org; Thu, 08 Sep 2022 04:22:35 -0400 Original-Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:62487 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWCnx-0006EQ-SE for 57652@debbugs.gnu.org; Thu, 08 Sep 2022 04:22:34 -0400 Original-Received: from [192.168.1.53] ([84.99.156.79]) by smtp.orange.fr with ESMTPA id WCnvoSzq49RnzWCnvoWtHV; Thu, 08 Sep 2022 10:22:32 +0200 X-ME-Helo: [192.168.1.53] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Thu, 08 Sep 2022 10:22:32 +0200 X-ME-IP: 84.99.156.79 Content-Language: fr, en-US In-Reply-To: <878rmua277.fsf@yahoo.com> 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:241840 Archived-At: On 08/09/2022 07:02, Po Lu wrote: > David Ponce writes: > >> diff --git a/term.el b/term.el >> index 797fb18074..c564a5429a 100644 >> --- a/term.el >> +++ b/term.el >> @@ -755,17 +755,19 @@ ansi-term-color-vector >> term-color-bright-cyan >> term-color-bright-white]) >> >> -(defcustom term-default-fg-color nil >> - "If non-nil, default color for foreground in Term mode." >> +(defcustom term-default-fg-color 'unspecified >> + "Default color for foreground in Term mode." >> :group 'term >> - :type '(choice (const nil) (string :tag "color"))) >> + :type '(choice (const unspecified) >> + (string :tag "color"))) > > Doesn't that change behavior? > > i.e. wouldn't it be better to test that term-default-fg-color is not nil > wherever the face is actually made that color? To be honest I don't know. I reread the spec that says: "Apart from the values given below, each face attribute can have the value ‘unspecified’. This special value means that the face doesn’t specify that attribute directly. An ‘unspecified’ attribute tells Emacs to refer instead to a parent face (see the description ‘:inherit’ attribute below); or, failing that, to an underlying face (*note Displaying Faces::). (However, ‘unspecified’ is not a valid value in ‘defface’.)" So it seems that unspecified is not allowed in defface. So, how to specify a missing attribute excepted by using nil in the defface used in term.el? (defface term `((t :foreground ,term-default-fg-color :background ,term-default-bg-color :inherit default)) "Default face to use in Term mode." :group 'term) Thanks!