From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#40866: customize-face obliterates obliterates elements of "face spec" alist. Date: Sun, 26 Apr 2020 11:30:24 +0000 Message-ID: <20200426113024.GA18629@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="27334"; mail-complaints-to="usenet@ciao.gmane.io" To: 40866@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 26 13:37:28 2020 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 1jSfbD-00070u-LC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Apr 2020 13:37:27 +0200 Original-Received: from localhost ([::1]:57182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSfbC-0000Ya-NZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Apr 2020 07:37:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54108) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSfV1-00079J-D7 for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:31:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSfV1-00064w-2g for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSfV0-00064k-1N for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSfUz-0000wn-UA for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Apr 2020 11:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40866 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.15879006392365 (code B ref -1); Sun, 26 Apr 2020 11:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Apr 2020 11:30:39 +0000 Original-Received: from localhost ([127.0.0.1]:60993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSfUc-0000a0-9g for submit@debbugs.gnu.org; Sun, 26 Apr 2020 07:30:39 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSfUY-0000Wc-9D for submit@debbugs.gnu.org; Sun, 26 Apr 2020 07:30:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54002) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSfUX-00071J-OA for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:30:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSfUW-0005b0-MX for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:30:33 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:35390 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1jSfUV-0005Xv-TB for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 07:30:32 -0400 Original-Received: (qmail 24718 invoked by uid 3782); 26 Apr 2020 11:30:25 -0000 Original-Received: from acm.muc.de (p4FE15195.dip0.t-ipconnect.de [79.225.81.149]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 26 Apr 2020 13:30:24 +0200 Original-Received: (qmail 18755 invoked by uid 1000); 26 Apr 2020 11:30:24 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/26 07:30:25 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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:179057 Archived-At: Hello, Emacs. On master, when a face is set up for a single type of terminal, or several types of terminal, customize-face disregards this, and obliterates all members of the "face spec" alist except one, which is always t. For example, suppose we have either of these in a custom-set-faces list: '(font-lock-function-name-face ((((background dark)) (:foreground "cyan" :weight bold)) (t (:foreground "Blue1" :weight bold)))) '(font-lock-function-name-face ((((background dark)) (:foreground "cyan" :weight bold)))) . In a light backgrounded Emacs session (e.g. in X-Windows) run customize-face on font-lock-function-name-face. Make some change to the face and click on . The (background dark) element has now been obliterated, leaving (in either case): '(font-lock-function-name-face ((t (:foreground "Blue1" :weight bold)))) . This is a bug. customize-face should respect face settings which are inapplicable on the current terminal. ######################################################################### Related wish list item: To construct these terminal specific face specs, I had to edit the raw lisp in .emacs. It took me three tries before I got a valid spec. I seem to remember that at one point it was possible to add alternative face specs for other terminal types inside customize-face. Am I dreaming, or was this facility removed for some reason? It would be really nice if one could edit a face spec in full generality inside customize-face, obviating the need to mess with intricate raw lisp. -- Alan Mackenzie (Nuremberg, Germany).