From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs 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 Message-ID: <87y125ucbz.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34336"; mail-complaints-to="usenet@ciao.gmane.io" To: 74104@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 30 11:15:33 2024 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 1t65jh-0008jk-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Oct 2024 11:15:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t65jM-00066b-Mb; Wed, 30 Oct 2024 06:15:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t65jE-00061R-7a for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 06:15:05 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t65jC-0004Wq-Lf for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 06:15:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=3L4Bm6EY4xaZWKEAoM0H4qcIS9828w199vTIYfY+keI=; b=PavEnZ7BQAzyckYdMmGD2psDRDgNZbf6IDK8jJHOjnJyX0d3B9/S1It6kWVJwzqu/hANS3r+T6ahOMYLeL7L0FY2LlTNHjCL6XY65oXc/1VZl+dnVS9r4w5Tu3RDmC2IQ/A6RWkq5wq/oCzkfggthZwHLHDbMRySZCw0Q2H8AKda2hqxhUxr9Oau3GZpQjALPr35XJV3BGhZkzK/Gl5p3VOb23DUrnJ6+Ut7BDd/jg3Gfoad8mvhkHFTxiXr2kc2QfhhbMdS7qrQ6Wg2ox5AWj6Z6fZsbituOIsiKz11F4P/Ks4KLOUuDdUfTDxF8vJWWHCS0C2aNuox7wpOfUBSfQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t65jC-0003Ns-Fr for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 06:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2024 10:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74104 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173028329712984 (code B ref -1); Wed, 30 Oct 2024 10:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Oct 2024 10:14:57 +0000 Original-Received: from localhost ([127.0.0.1]:34493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t65j7-0003NL-3n for submit@debbugs.gnu.org; Wed, 30 Oct 2024 06:14:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t65j2-0003NF-QH for submit@debbugs.gnu.org; Wed, 30 Oct 2024 06:14:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t65j1-0005zu-B7 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 06:14:51 -0400 Original-Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t65ix-0004RN-FX for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 06:14:51 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 0FEFD240004 for ; Wed, 30 Oct 2024 10:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1730283282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3L4Bm6EY4xaZWKEAoM0H4qcIS9828w199vTIYfY+keI=; b=Xc5hVJNZhf68Wf3yk++kkhTXz08xuPUoTiRaqTXTHCyNJxFzBYXh6UWUEIIOw2MQqmTYQU wbzOFTkTyB9GatmAvfw9J+OLJULLj4pHs1uOR8XAbTxuv2E+TuFEczJRBYwrb7pKojiU9x sWD1ydJ7V25ckezHO9os7jV0K6rFLHTl7MnUllY9P9avavNjcaYHqmucIJ1rzAqRQJfPLp tNzkdcZyCH0R+K7PXyP3gcb5N7WnkC0fV4+EQX6aX5FN20PpZHw6NtTxStDVmwA3l0gY+e ot0NrZk3V58xu65HLtxeuEFV/5LQSPbtnERRSB1UaLuanOyBEW5QN7PDEcvIGw== X-GND-Sasl: info@protesilaos.com Received-SPF: pass client-ip=2001:4b98:dc4:8::221; envelope-from=info@protesilaos.com; helo=relay1-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294553 Archived-At: 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