unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57652: 29.0.50; Warning setting attribute of face ‘term’
@ 2022-09-07 18:49 David Ponce
  2022-09-08  5:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 7+ messages in thread
From: David Ponce @ 2022-09-07 18:49 UTC (permalink / raw)
  To: 57652; +Cc: gregory

Hello,

Since below commit:

Gregory Heytings <gregory@heytings.org>	2022-09-02 22:30:25 +0200
commit	d0a66f3e0e668d8c12c54436740c62f8e238a664
Display a warning for some uses of nil in face attributes.
* src/xfaces.c (HANDLE_INVALID_NIL_VALUE): New macro, which displays
a warning for invalid uses of nil as a face attribute value.
(Finternal_set_lisp_face_attribute): Use the macro for the attributes
:foreground, :distant-foreground and :background.

When opening a term window (M-x term) for the 1st time, the below 
messages are displayed in the *Messages* buffer:

Warning: setting attribute ‘:foreground’ of face ‘term’: nil value is 
invalid, use ‘unspecified’ instead.
Warning: setting attribute ‘:background’ of face ‘term’: nil value is 
invalid, use ‘unspecified’ instead.

The small patch below fixed the issue for me:

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")))
  (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."
+(defcustom term-default-bg-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")))
  (make-obsolete-variable 'term-default-bg-color "use the face `term' 
instead."
                          "24.3")


Thanks!

Configured using:
  'configure --with-x-toolkit=gtk3 --with-cairo
  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
   value of $LC_TIME: fr_FR.utf8
   value of $LANG: fr_FR.UTF-8
   locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
   shell-dirtrack-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   line-number-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t

Load-path shadows:
None found.





^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-08 12:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 18:49 bug#57652: 29.0.50; Warning setting attribute of face ‘term’ David Ponce
2022-09-08  5:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-08  8:22   ` David Ponce
2022-09-08  8:42     ` Eli Zaretskii
2022-09-08 12:34       ` David Ponce
2022-09-08  8:43     ` David Ponce
2022-09-08 11:44     ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).