From: Protesilaos Stavrou <info@protesilaos.com>
To: 74104@debbugs.gnu.org
Subject: bug#74104: 31.0.50; 'custom-set-faces' overrides face when no theme is loaded
Date: Wed, 30 Oct 2024 12:14:40 +0200 [thread overview]
Message-ID: <87y125ucbz.fsf@protesilaos.com> (raw)
Dear maintainers,
When a theme is already enabled, 'custom-set-faces' has the effect of
adding face attributes on top of the existing ones. Those that were
present are not removed: they are blended with the new ones.
This, however, is not happening when no theme is loaded. In that
scenario, 'custom-set-faces' removes all the underlying face attributes
and keeps only those specified in the function call. I think this is a
mistake.
Steps to reproduce:
- Start Emacs in 'emacs -Q'.
- Note that the mode line has a background colour that is distinct from
that of the buffer.
- In the scratch buffer, evaluate:
(custom-set-faces
'(mode-line ((t :box nil))))
- Note that the above did not only remove the :box attribute. It also
removed the :background value that was there. The mode line is now the
same colour as the scratch buffer.
- Now try to undo the effect:
(custom-set-faces
'(mode-line (( ))))
- Neither the original background nor the box style is not restored.
My expected behaviour is for 'custom-set-faces' to (i) preserve the
underlying face attributes, (ii) only override those that are specified,
and (iii) revert to the underlying face when it is called with a nil
value.
All the best,
Protesilaos (or simply "Prot")
* * *
In GNU Emacs 31.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.16.0) of 2024-10-27 built on kronos
Repository revision: aaefb67f54513e8375ec8356d09bf2e6f25b9116
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)
Configured using:
'configure --prefix=/usr/local --with-x-toolkit=gtk3
--disable-gc-mark-trace --with-native-compilation=aot --without-gif
--without-tiff --without-selinux --without-xinput2 --without-gpm
--without-compress-install --without-xft --with-cairo --with-harfbuzz
--with-tree-sitter=ifavailable --without-gsettings --without-gconf'
Configured features:
ACL CAIRO DBUS FREETYPE GLIB GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBOTF
LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND THREADS TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM
GTK3 ZLIB
--
Protesilaos Stavrou
https://protesilaos.com
next reply other threads:[~2024-10-30 10:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 10:14 Protesilaos Stavrou [this message]
2024-10-30 15:39 ` bug#74104: 31.0.50; 'custom-set-faces' overrides face when no theme is loaded Eli Zaretskii
2024-10-31 5:35 ` Protesilaos Stavrou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y125ucbz.fsf@protesilaos.com \
--to=info@protesilaos.com \
--cc=74104@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.