From unknown Sat Sep 06 14:24:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46748: 28.0.50; [PATCH] Use named faces in shortdoc Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2021 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46748 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 46748@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16141726975795 (code B ref -1); Wed, 24 Feb 2021 13:19:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2021 13:18:17 +0000 Received: from localhost ([127.0.0.1]:33870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEu3V-0001VN-AM for submit@debbugs.gnu.org; Wed, 24 Feb 2021 08:18:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:47062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEqHB-0001bs-0V for submit@debbugs.gnu.org; Wed, 24 Feb 2021 04:16:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEqHA-0008HD-S3 for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 04:16:08 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEqH8-0006AK-Oz for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 04:16:08 -0500 X-Originating-IP: 94.46.225.161 Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 0CB44240014 for ; Wed, 24 Feb 2021 09:16:01 +0000 (UTC) From: Protesilaos Stavrou Date: Wed, 24 Feb 2021 11:15:59 +0200 Message-ID: <87zgztq10w.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=217.70.183.193; envelope-from=public@protesilaos.com; helo=relay1-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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Wed, 24 Feb 2021 08:18:16 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Dear maintainers, The shortdoc.el library applies faces in a way that is difficult for users/themes to customise. The attached patch addresses that issue. All the best, Protesilaos -- Protesilaos Stavrou protesilaos.com --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-named-faces-in-shortdoc.patch >From 4f6f62a10da39646692ed70eec60ff05726d7c32 Mon Sep 17 00:00:00 2001 Message-Id: <4f6f62a10da39646692ed70eec60ff05726d7c32.1614158067.git.info@protesilaos.com> From: Protesilaos Stavrou Date: Wed, 24 Feb 2021 11:01:20 +0200 Subject: [PATCH] Use named faces in shortdoc * shortdoc.el (shortdoc-heading): Define new face for headings. (shortdoc-display-group): Apply new heading face. (shortdoc--display-function): Use existing face for section text. * etc/NEWS: Document new face. --- etc/NEWS | 4 ++++ lisp/emacs-lisp/shortdoc.el | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 5df8ee140c..2bad41f5ee 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1734,6 +1734,10 @@ If this is bound to something non-nil, functions like This is a plain 2D button, but uses the background color instead of the foreground color. +--- +*** New face 'shortdoc-heading'. +Applies to headings of shortdoc sections. + +++ *** New predicate functions 'length<', 'length>' and 'length='. Using these functions may be more efficient than using 'length' (if diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 39e69f5aab..789d6325e9 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -40,6 +40,11 @@ shortdoc-separator (t :height 0.1 :inverse-video t :extend t)) "Face used to separate sections.") +(defface shortdoc-heading + '((t :inherit variable-pitch :height 1.3 :weight bold)) + "Face used for a heading." + :version "28.1") + (defface shortdoc-section '((t :inherit variable-pitch)) "Face used for a section.") @@ -1107,7 +1112,7 @@ shortdoc-display-group (insert "\n")) (insert (propertize (concat (substitute-command-keys data) "\n\n") - 'face '(variable-pitch (:height 1.3 :weight bold)) + 'face 'shortdoc-heading 'shortdoc-section t))) ;; There may be functions not yet defined in the data. ((fboundp (car data)) @@ -1175,7 +1180,7 @@ shortdoc--display-function (prin1 value (current-buffer))) (insert "\n " single-arrow " " (propertize "[it depends]" - 'face 'variable-pitch) + 'face 'shortdoc-section) "\n")) (:no-value (if (stringp value) -- 2.30.1 --=-=-=-- From unknown Sat Sep 06 14:24:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46748: 28.0.50; [PATCH] Use named faces in shortdoc Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2021 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46748 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Protesilaos Stavrou Cc: 46748@debbugs.gnu.org Received: via spool by 46748-submit@debbugs.gnu.org id=B46748.1614183536303 (code B ref 46748); Wed, 24 Feb 2021 16:19:02 +0000 Received: (at 46748) by debbugs.gnu.org; 24 Feb 2021 16:18:56 +0000 Received: from localhost ([127.0.0.1]:35581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwsG-0008WI-JH for submit@debbugs.gnu.org; Wed, 24 Feb 2021 11:18:56 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwsE-0008W4-Ix for 46748@debbugs.gnu.org; Wed, 24 Feb 2021 11:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eB3hOpoeKuE9bW/pQwwTA/akcdJxks4tY2p2U9v1/Do=; b=o3JIEEA9mNvKgE7UWL5eywxddx u7v982ZBPXybZVu/7zzZJCeu4PRj4I9PYgonT7ZmozIum0hHZOKIqsMyguaaf8NZ8WeaHKVAhlRSr bVzee2SF/XrEfpGbBGQKZiIOEioBjDchUXfvaxT8atHZsrXzEdANwqU0IC+xPhoGTixo=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEws5-0005bg-KD; Wed, 24 Feb 2021 17:18:44 +0100 From: Lars Ingebrigtsen References: <87zgztq10w.fsf@protesilaos.com> X-Now-Playing: Eats Tapes's _Still Works_: "Ptery D" Date: Wed, 24 Feb 2021 17:18:40 +0100 In-Reply-To: <87zgztq10w.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Wed, 24 Feb 2021 11:15:59 +0200") Message-ID: <874ki1a17j.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Protesilaos Stavrou writes: > The shortdoc.el library applies faces in a way that is difficult for > users/themes to customise. The attached patch addresses that issue. Thanks; applied to Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Protesilaos Stavrou writes: > The shortdoc.el library applies faces in a way that is difficult for > users/themes to customise. The attached patch addresses that issue. Thanks; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 24 11:18:56 2021 Received: (at control) by debbugs.gnu.org; 24 Feb 2021 16:18:56 +0000 Received: from localhost ([127.0.0.1]:35584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwsK-00004q-5F for submit@debbugs.gnu.org; Wed, 24 Feb 2021 11:18:56 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEwsI-0008WA-Rw for control@debbugs.gnu.org; Wed, 24 Feb 2021 11:18:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9Y96f65aEEqwJO+0MvXej2eRxSq/aNGs/4OawICF3D0=; b=vUp57egeIyfQOYJ1Ue3TTkvcaW /Uzi+Y9ymiZrWxuXWkU4liIHYESiIoyOKte8OtwgKYEUUBDcVPSM9Cvvh1brJp5zqqHk3a7gWrbbF PfFlWq10paCa4fwfzZ7/5oy3rvUfVenScxtFdpPn1dX2QI/NGu0M8VTo0H1o3TC+rgb0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEwsB-0005bs-BZ for control@debbugs.gnu.org; Wed, 24 Feb 2021 17:18:49 +0100 Date: Wed, 24 Feb 2021 17:18:46 +0100 Message-Id: <8735xla17d.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46748 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 46748 fixed close 46748 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 46748 fixed close 46748 28.1 quit