bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57652: 29.0.50; Warning setting attribute of face ‘term’


From: David Ponce
Subject: bug#57652: 29.0.50; Warning setting attribute of face ‘term’
Date: Thu, 8 Sep 2022 14:34:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

On 08/09/2022 10:42, Eli Zaretskii wrote:
Cc: 57652@debbugs.gnu.org, gregory@heytings.org
Date: Thu, 8 Sep 2022 10:22:31 +0200
From: David Ponce <da_vid@orange.fr>

     "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.

Where does it say that unspecified is not allowed?  (And this doc
string is from set-face-attribute, not from defface.)

I mentioned what is currently in the Emacs Lisp reference manual (lisp.info): (elisp)Top > Display > Faces > Face Attributes

So, how to specify a missing attribute excepted by using nil in the
defface used in term.el?

If you don't have anything to say about an attribute, just don't
mention it in defface.  That's what unspecified means, as the doc
string says.  So I'm unsure why you would need "to specify a missing
attribute".

It is not me, it is how it is currently implemented in term.el:

(defcustom term-default-fg-color nil
  "If non-nil, default color for foreground in Term mode."
  :group 'term
  :type '(choice (const nil) (string :tag "color")))
(make-obsolete-variable 'term-default-fg-color "use the face `term' instead."
                        "24.3")

(defcustom term-default-bg-color nil
  "If non-nil, default color for foreground in Term mode."
  :group 'term
  :type '(choice (const nil) (string :tag "color")))
(make-obsolete-variable 'term-default-bg-color "use the face `term' instead."
                        "24.3")

(defface term
  `((t
     :foreground ,term-default-fg-color
     :background ,term-default-bg-color
     :inherit default))
  "Default face to use in Term mode."
  :group 'term)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]