From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#64725: 30.0.50; set-face-foreground shows background colors Date: Wed, 19 Jul 2023 09:09:11 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20516"; mail-complaints-to="usenet@ciao.gmane.io" To: 64725@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 19 09:10:26 2023 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 1qM1KK-000564-Il for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jul 2023 09:10:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM1K7-0000fu-BF; Wed, 19 Jul 2023 03:10:11 -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 1qM1K0-0000dh-NK for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:10:04 -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 1qM1Jy-00082X-O4 for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qM1Jy-0004Gh-Iq for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Helmut Eller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jul 2023 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64725 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.168975057216357 (code B ref -1); Wed, 19 Jul 2023 07:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jul 2023 07:09:32 +0000 Original-Received: from localhost ([127.0.0.1]:54840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM1JU-0004Fl-5Y for submit@debbugs.gnu.org; Wed, 19 Jul 2023 03:09:32 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:42960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM1JR-0004FY-B3 for submit@debbugs.gnu.org; Wed, 19 Jul 2023 03:09:30 -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 1qM1JL-0000Ct-Sp for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:09:23 -0400 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qM1JK-0007vv-8c for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 03:09:23 -0400 Original-Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fb761efa7aso10654666e87.0 for ; Wed, 19 Jul 2023 00:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689750560; x=1690355360; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=JVWLaAoS6m+Y8i8Q3zE11YtBnhsEOR6H+dXjxYfbEjs=; b=gpaO0y1eyYPXiO0rSgBHfFRzt54EUliUaIvCuJTuFq7i/hsz8HZQnlWCYSNJgsrMGc OFP/X7O/Wjd0AYMuOCuG3osh0apIyMsLIifi9z7AM7j2Vq77gPf6S91fjzB/krlRBcDF z/L1xI7MNN88HWc/Ww1deYgSyQcEkHXqMFUgJMWDO9hmpYjie/kAs/RaSgbTnRmGIuYW tf+GaiSrevft7EdQi48b+Fkyj5dOs3VO+wFbW2dl47baPdHp9PICqow82ac/C2lyaX4p M7ozNjUqb2Nr46G100bTzwQRzgGBuC2TPbL3SvyVoomRKe6+CxZGW/mLow6AeD5yql+Q /6QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689750560; x=1690355360; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JVWLaAoS6m+Y8i8Q3zE11YtBnhsEOR6H+dXjxYfbEjs=; b=TCHb/dxJIOg3kpfsc1PwSP/mw3UtqVKMVmFKpLmxG1gfi9p0eExDN2CPE/qvNVjXZy /CirE6VkONmIH/+NOGfOIj13vFpXnD09PcEXkG0dVDPQdrJ2tkmdAOdwp6JjHyx0Z7FZ G+CdyU7Ew36PMiGq4kXSDA/Gpqny2Atc/5JUPOlYk9DIMuDre3Nmvr7U6jQywXU9AMTB CKWt2U9mdG5WWwbTc7W1xjZMOxgkNh89kI6q9vQG+MPFc7+M2ndahg53KwbT3fK1UATM ZUEObhZV79TUFoH4Yu/mUNivykBAqtaQQNjR5AgQlQxGUvJTptMwQLGa2Qlupp5qqlPc d5SA== X-Gm-Message-State: ABy/qLbR20X6IV+XmThI2wr5LiXQBnHTyAA1bYF+CpIpqGH2tHqHhmtT AZmhYxhtK1twaEvBOBO8YXSyxsOyNQc= X-Google-Smtp-Source: APBJJlH+9uEb5oxH7TW0WgYiPgiKdIq40fHmq9/MhbmTAaaTmWu9oywX+yoKu+FzN71L0JvtaUxBqw== X-Received: by 2002:ac2:58e9:0:b0:4f8:70d8:28f8 with SMTP id v9-20020ac258e9000000b004f870d828f8mr10702782lfo.55.1689750559584; Wed, 19 Jul 2023 00:09:19 -0700 (PDT) Original-Received: from caladan ([212.46.176.29]) by smtp.gmail.com with ESMTPSA id bh17-20020a05600c3d1100b003fbb1ce274fsm5814556wmb.0.2023.07.19.00.09.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 00:09:18 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=eller.helmut@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:265515 Archived-At: --=-=-= Content-Type: text/plain When I try to set the foreground color of a face, e.g. with: M-x set-face-foreground RET font-lock-string-face RET and then press TAB to see the available colors, then Emacs displays the list of colors as background with text in the default foreground. It would be more useful to see the text with the candidate color as foreground on the default background. Maybe you could consider this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=faces.patch diff --git a/lisp/faces.el b/lisp/faces.el index 44d64c743ba..6233afb0d4d 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1340,10 +1340,11 @@ read-face-attribute (format "%s" old-value)))) (setq new-value (if (memq attribute '(:foreground :background)) - (let ((color - (read-color - (format-prompt "%s for face `%s'" - default attribute-name face)))) + (let* ((prompt (format-prompt + "%s for face `%s'" + default attribute-name face)) + (fg (eq attribute ':foreground)) + (color (read-color prompt nil nil nil fg))) (if (equal (string-trim color) "") default color)) --=-=-= Content-Type: text/plain In GNU Emacs 30.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-07-19 built on caladan Repository revision: 8b1c92da79f967172afc3214bc9ee58bd08ddc17 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-xpm=ifavailable --with-jpeg=ifavailable --with-gif=ifavailable --with-tiff=ifavailable' Configured features: CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 GTK3 ZLIB Important settings: value of $LANG: C.UTF-8 locale-coding-system: utf-8-unix --=-=-=--