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:43:03 +0200 Message-ID: References: <5f92d116-3cfd-e4b4-0caf-b2337fa1bd7f@orange.fr> <878rmua277.fsf@yahoo.com> <319e3926-7c22-cabd-43dd-a02f3a01c734@orange.fr> 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="12301"; 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:44:34 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 1oWD9E-0002vM-Re for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 10:44:32 +0200 Original-Received: from localhost ([::1]:47368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWD9D-0006tc-V8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Sep 2022 04:44:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWD8l-0006qx-W8 for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 04:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWD8l-0003JC-3J for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 04:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWD8k-0006md-T8 for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2022 04:44: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:44: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.166262658925988 (code B ref 57652); Thu, 08 Sep 2022 08:44:02 +0000 Original-Received: (at 57652) by debbugs.gnu.org; 8 Sep 2022 08:43:09 +0000 Original-Received: from localhost ([127.0.0.1]:57203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWD7s-0006l6-QZ for submit@debbugs.gnu.org; Thu, 08 Sep 2022 04:43:09 -0400 Original-Received: from smtp04.smtpout.orange.fr ([80.12.242.126]:59600 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWD7q-0006kw-K7 for 57652@debbugs.gnu.org; Thu, 08 Sep 2022 04:43:07 -0400 Original-Received: from [192.168.1.53] ([84.99.156.79]) by smtp.orange.fr with ESMTPA id WD7ooPxhrOizNWD7ooxqmB; Thu, 08 Sep 2022 10:43:05 +0200 X-ME-Helo: [192.168.1.53] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Thu, 08 Sep 2022 10:43:05 +0200 X-ME-IP: 84.99.156.79 Content-Language: fr, en-US In-Reply-To: <319e3926-7c22-cabd-43dd-a02f3a01c734@orange.fr> 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:241845 Archived-At: On 08/09/2022 10:22, David Ponce wrote: > 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! > Also it seems that nil attribute is allowed in some cases in defface, because when I show the definition of the default face as a lisp expression I get: ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :height 102 :weight regular :slant normal :underline nil :overline nil :extend nil :strike-through nil :box nil :inverse-video nil :foreground "black" :background "white" :stipple nil :inherit nil))) Thanks!