From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Consistent face for keys in *Help* and `substitute-command-keys' Date: Sat, 06 Mar 2021 20:28:09 +0200 Message-ID: <83mtvguog6.fsf@gnu.org> References: <83blc9tnvz.fsf@gnu.org> <83y2fcrzkt.fsf@gnu.org> <831rd4romg.fsf@gnu.org> <83zgzsq7xn.fsf@gnu.org> <83v9afriqp.fsf@gnu.org> <83zgzjhvdn.fsf@gnu.org> <83a6rhxwah.fsf@gnu.org> <837dmlxspt.fsf@gnu.org> <834khpxr0s.fsf@gnu.org> <8335x8ybw9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11503"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 06 19:29:20 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lIbg0-0002tz-2I for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Mar 2021 19:29:20 +0100 Original-Received: from localhost ([::1]:42108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIbfz-0003Ta-4v for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Mar 2021 13:29:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIbf7-0002tp-CC for emacs-devel@gnu.org; Sat, 06 Mar 2021 13:28:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43955) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIbf6-0000mV-Gp; Sat, 06 Mar 2021 13:28:24 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3197 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lIbf3-0001QI-37; Sat, 06 Mar 2021 13:28:22 -0500 In-Reply-To: (message from Stefan Kangas on Sat, 6 Mar 2021 11:32:45 -0600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266096 Archived-At: > From: Stefan Kangas > Date: Sat, 6 Mar 2021 11:32:45 -0600 > Cc: larsi@gnus.org, emacs-devel@gnu.org > > > OK, we can add a note to that effect to the `help-key-binding' > > docstring. > > Here's an updated patch. The changes from the previous patch are all in > the definition of the `help-key-binding' face. > > Let me know if there is anything else to change before this can go in. Thanks, I see only minor nits, this can go in once they are taken care of. > +*** Keybindings in 'help-mode' use the new `help-key-binding' face. I think this should mention substitute-command-keys, and say that any text that is run through that function will be propertized. I'd also mention the effect on tooltips there. > +(defface help-key-binding > + '((((class color) (min-colors 88)) :foreground "ForestGreen") > + (((class color) (min-colors 16)) :foreground "green") > + (((class color) (min-colors 8)) :foreground "green") The last 2 lines are unnecessary: the TTY color translation will do that automatically. > --- a/lisp/help.el > +++ b/lisp/help.el > @@ -104,8 +104,8 @@ help-map > (define-key map "R" 'info-display-manual) > (define-key map "s" 'describe-syntax) > (define-key map "t" 'help-with-tutorial) > - (define-key map "w" 'where-is) > (define-key map "v" 'describe-variable) > + (define-key map "w" 'where-is) > (define-key map "q" 'help-quit) Why the change in the order? > ;; Function is not on any key. > - (progn (insert "M-x ") > - (goto-char (+ end-point 3)) > - (delete-char 1)) > + (progn > + (insert (propertize "M-x " > + 'face 'help-key-binding > + 'font-lock-face 'help-key-binding)) Why are we fontifying "M-x" here?