From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Consistent face for keys in *Help* and `substitute-command-keys' Date: Sat, 6 Mar 2021 22:03:05 -0500 Message-ID: References: <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> <83mtvguog6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31692"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 07 04:03:56 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 1lIji0-00088W-6B for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Mar 2021 04:03:56 +0100 Original-Received: from localhost ([::1]:52916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIjhy-0003oq-Kj for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Mar 2021 22:03:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIjhG-0003Pd-09 for emacs-devel@gnu.org; Sat, 06 Mar 2021 22:03:10 -0500 Original-Received: from mail-pg1-f178.google.com ([209.85.215.178]:36677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIjhE-0006un-Ba; Sat, 06 Mar 2021 22:03:09 -0500 Original-Received: by mail-pg1-f178.google.com with SMTP id t26so4101255pgv.3; Sat, 06 Mar 2021 19:03:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=/J8SzlIjAoLEB4mt3zdgDYyMI2TWd6Q7jDS7qAhPS2I=; b=k4aAsGf8yMuK4e/I+mQrRs2qB/3v2/IdfeF+HqgqtM3dUVVF1R+ZtU/aLyS3V11FB+ CuelXdRVw5DOOE/cMc13supn6n7c4g8hFexACkB10CDoVh7NMx43zJAZ0Sqz359QTYz0 Qd7hc79wIGZDFZQNJ/eZLzdgYXyUAJdSdzGefyx3VPwDhVcQ//3cqlTXVJ87wCXQ2R3z j0beRn21Dw+Kc73NubNjfDikLLdV7iaMmFKaMh3bQppCZ7q/zJvMQ/G4oiWcFk0gtlRF oDiFsWUDqzVpg1scI6BE+hJJf95+BvzPbWw6V2+aNoZY2jOgtA7Mm7y812zH0r4UWh3Q 0kEg== X-Gm-Message-State: AOAM531aFHDSNR00vRhdDga/7S5pvEVrvy2aPjmvpRWZkXeDidSOPqG8 Af2JkmXGRWTtg7Ei4s8V/Ptzwuvi7kU2UxOcBfMWjQxf028= X-Google-Smtp-Source: ABdhPJzdIO13znLaQ55oic0gRJSJPTC9cZ2sGdbqSFODRkUdwDYG3J7sjtHLT2a6ceJHJ0SAYBYLvuLJ+E2mC0PAf0w= X-Received: by 2002:a63:fd0a:: with SMTP id d10mr14839745pgh.345.1615086186408; Sat, 06 Mar 2021 19:03:06 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 6 Mar 2021 22:03:05 -0500 In-Reply-To: <83mtvguog6.fsf@gnu.org> Received-SPF: pass client-ip=209.85.215.178; envelope-from=stefankangas@gmail.com; helo=mail-pg1-f178.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:266107 Archived-At: Eli Zaretskii writes: > Thanks, I see only minor nits, this can go in once they are taken care > of. Thank you for reviewing the patch. >> +*** 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. How about this: *** Keybindings in 'help-mode' use the new 'help-key-binding' face. This face is added by 'substitute-command-keys' to any "\[command]" substitution. The return value of that function should consequently be assumed to be a propertized string. Note that the new face will also be used in tooltips. When using the GTK toolkit, this is only true if 'x-gtk-use-system-tooltips' is t. >> --- 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? It's just to make them alphabetical. If it is too minor, I can leave it out. >> + (insert (propertize "M-x " >> + 'face 'help-key-binding >> + 'font-lock-face 'help-key-binding)) > > Why are we fontifying "M-x" here? I understand "M-x" to be part of the keybinding for that command, so I think it makes sense to use the same face for that part too. IOW, rather than fontifying only "apropos" in "M-x apropos" we fontify the whole string.