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#49162: 28.0.50; [PATCH] Use named face for apropos-face-button Date: Mon, 21 Jun 2021 23:17:32 +0300 Message-ID: <878s333rc3.fsf@protesilaos.com> 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="17836"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.32.1 (https://notmuchmail.org) Emacs/28.0.50 (x86_64-pc-linux-gnu) To: 49162@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 21 22:18:37 2021 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 1lvQNQ-0004So-T3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Jun 2021 22:18:36 +0200 Original-Received: from localhost ([::1]:39970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvQNP-0000lQ-Ug for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Jun 2021 16:18:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvQMs-0000dm-9e for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 16:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvQMs-0008Tx-2M for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 16:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvQMr-0002rC-W0 for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 16:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Jun 2021 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162430666710952 (code B ref -1); Mon, 21 Jun 2021 20:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jun 2021 20:17:47 +0000 Original-Received: from localhost ([127.0.0.1]:36969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvQMd-0002qa-2x for submit@debbugs.gnu.org; Mon, 21 Jun 2021 16:17:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvQMZ-0002qR-US for submit@debbugs.gnu.org; Mon, 21 Jun 2021 16:17:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvQMY-0000SY-5g for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 16:17:43 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:59617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvQMV-0008Bi-4m for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 16:17:41 -0400 Original-Received: (Authenticated sender: public@protesilaos.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E268CC0003 for ; Mon, 21 Jun 2021 20:17:33 +0000 (UTC) Received-SPF: none client-ip=217.70.183.198; envelope-from=info@protesilaos.com; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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" Xref: news.gmane.io gmane.emacs.bugs:208831 Archived-At: --=-=-= Content-Type: text/plain Dear maintainers, The attached patch defines a new face for the Apropos buffer which applies to buttons that indicate faces. Before the attributes were hardcoded and could thus not be edited by the user/theme. All the best, Protesilaos -- Protesilaos Stavrou https://protesilaos.com --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-named-face-for-apropos-face-button.patch >From fed7e750cb8a6b0057c8c036c6113335f3ebeb44 Mon Sep 17 00:00:00 2001 Message-Id: From: Protesilaos Stavrou Date: Mon, 21 Jun 2021 23:11:35 +0300 Subject: [PATCH] Use named face for apropos-face-button * etc/NEWS: Document new face. * lisp/apropos.el (apropos-face): Define new face. (apropos-face-button): Specify face instead of hardcoding attributes. --- etc/NEWS | 3 +++ lisp/apropos.el | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 3c7d5ca10b..4cbd87b917 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1606,6 +1606,9 @@ These new navigation commands are bound to 'n' and 'p' in *** New command 'apropos-function'. This works like 'C-u M-x apropos-command' but is more discoverable. +*** New face 'apropos-face-button'. +Applies to buttons that indicate a face. + ** CC Mode *** Added support for Doxygen documentation style. diff --git a/lisp/apropos.el b/lisp/apropos.el index 17665a725a..f24448599f 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -96,6 +96,11 @@ (defface apropos-property "Face for property name in Apropos output, or nil for none." :version "24.3") +(defface apropos-face-button + '((t (:inherit (font-lock-variable-name-face button)))) + "Face for buttons that indicate a face in Apropos." + :version "28.1") + (defface apropos-function-button '((t (:inherit (font-lock-function-name-face button)))) "Button face indicating a function, macro, or command in Apropos." @@ -276,7 +281,7 @@ (define-button-type 'apropos-user-option (define-button-type 'apropos-face 'apropos-label "Face" 'apropos-short-label "F" - 'face '(font-lock-variable-name-face button) + 'face 'apropos-face-button 'help-echo "mouse-2, RET: Display more help on this face" 'follow-link t 'action (lambda (button) -- 2.32.0 --=-=-=--