From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#64799: [PATCH] Add 'project-prompt-key' face Date: Fri, 28 Jul 2023 06:35:24 +0000 Message-ID: <87zg3g5ys3.fsf@posteo.net> References: <87zg3nqbuc.fsf@protesilaos.com> <87wmyqhhig.fsf@posteo.net> <874jluspp4.fsf@protesilaos.com> <87sf9ehgoi.fsf@posteo.net> <874jlt7t4f.fsf@protesilaos.com> <0e8dbebf-c0cb-01db-8a01-c7c7a165b826@gutov.dev> <87sf9cmr4x.fsf@posteo.net> <4e277440-3c96-549e-2daf-07ecf6ea9bee@gutov.dev> <87jzun5l9p.fsf@protesilaos.com> <81b2c1d6-506e-0b9b-53fd-66658e70aa44@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31120"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Protesilaos Stavrou , 64799@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 28 09:41:40 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 1qPI6W-0007wL-Jk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jul 2023 09:41:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPH56-0004hO-3F; Fri, 28 Jul 2023 02:36:08 -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 1qPH50-0004ba-CT for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 02:36:02 -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 1qPH50-0003yF-3F for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 02:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPH4z-0006fN-Mu for bug-gnu-emacs@gnu.org; Fri, 28 Jul 2023 02:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2023 06:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64799-submit@debbugs.gnu.org id=B64799.169052613625593 (code B ref 64799); Fri, 28 Jul 2023 06:36:01 +0000 Original-Received: (at 64799) by debbugs.gnu.org; 28 Jul 2023 06:35:36 +0000 Original-Received: from localhost ([127.0.0.1]:43513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPH4Z-0006ej-Ly for submit@debbugs.gnu.org; Fri, 28 Jul 2023 02:35:35 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:58219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPH4W-0006eT-I6 for 64799@debbugs.gnu.org; Fri, 28 Jul 2023 02:35:34 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 52F64240101 for <64799@debbugs.gnu.org>; Fri, 28 Jul 2023 08:35:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690526126; bh=bQV9YhGGwGLVpQjro8P3VOq4TSt2cNUubL0DVT3hIWg=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=LJZkAgEBlft9f3m+QKWe8TZBXZ0SfRb3m421RpOIQOUuSnfE4iEGT+KuzRDKurC/x 5KnjO83iq1l9Kq5bJfwXLCOdPrIIERLbwwVIJHPuDeFH18bkc6hwof+ZgnaL92f1N7 vi+4qZ2w9UpqMNp0Rj+sFLe8uJsmQEkxaky5SA/o3U4etergbIvIjfKATcie31mqju sjnCt+Z4r9hFLI89jcWMIxcGCP+p2Un94Q0K6LPdLmyCSWk2ENlpvqd07vYSNd4imC QSRJY4QXIFD/xjJueb5rBjQQzE7SXaRJkE3aKDR+a2BkZun4hGcGTVDQ3evcbxa4UN rJUBR7TfTZr/w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RByYn3D3lz9s1r; Fri, 28 Jul 2023 08:35:25 +0200 (CEST) In-Reply-To: <81b2c1d6-506e-0b9b-53fd-66658e70aa44@gutov.dev> (Dmitry Gutov's message of "Thu, 27 Jul 2023 04:28:08 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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:266238 Archived-At: Dmitry Gutov writes: > On 26/07/2023 07:50, Protesilaos Stavrou wrote: >> For my use, and Emacs 28+, I want this: >> (format "%s %s" >> (propertize (key-description key) 'face 'project-prompt-key) >> label) >> The reason I mentioned the possibility of a user option is because >> without the square brackets the bold face will not have the same effect >> as the current design. The square brackets help add structure and make >> it easier to identify the keys. The use of 'bold' without the square >> brackets may make it more difficult for users to spot the keys. > > The change in format seems to go hand-in-hand with the change in face, > though, because help-key-binding has a box already. > > Does this look good to everybody? Looks good to me too, but I haven't tried it out. > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index d482cc24d70..3611757fb82 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -1781,9 +1781,13 @@ project--keymap-prompt > (let ((key (if key > (vector key) > (where-is-internal cmd (list project-prefix-map) t)))) > - (format "[%s] %s" > - (propertize (key-description key) 'face 'bold) > - label))) > + (if (facep 'help-key-binding) > + (format "%s %s" > + (propertize (key-description key) 'face > 'help-key-binding) > + label) > + (format "[%s] %s" > + (propertize (key-description key) 'face 'bold) > + label)))) > project-switch-commands > " "))