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: [External] : Re: Consistent face for keys in *Help* and `substitute-command-keys' Date: Mon, 8 Mar 2021 11:40:38 -0500 Message-ID: References: <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> <87czwageno.fsf@mail.linkov.net> 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="23533"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "larsi@gnus.org" , "emacs-devel@gnu.org" To: Drew Adams , Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 17:48:57 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 1lJJ3w-0005zS-SO for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 17:48:56 +0100 Original-Received: from localhost ([::1]:42656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJJ3v-00073N-RM for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 11:48:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJIvz-0008Fn-Hl for emacs-devel@gnu.org; Mon, 08 Mar 2021 11:40:44 -0500 Original-Received: from mail-pg1-f178.google.com ([209.85.215.178]:38379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJIvx-0001wh-UW; Mon, 08 Mar 2021 11:40:43 -0500 Original-Received: by mail-pg1-f178.google.com with SMTP id e6so6743067pgk.5; Mon, 08 Mar 2021 08:40:40 -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=eGpuCMYuxvz6tnmjE9K/RCLI6eCkHokT4nY2+rliTyU=; b=RQfkW0pXaDe3dH9smthjDo0nJIk6MczxQiAjztKCINgNZSBVr9Vo06GOrGZNqan5hW xQPR0o5o3KYp1h/S1z2uJ8FQ4xpDgbmb+AYMAIJMGaj1iL5dSUyYeP3Z+MV9Ta0k8jWu g3AbDmjwBGi9f23LbINCKvQWHuRccihr9PJsniv8RuHCQF+svDROAaPwUeOmG//bXYJ1 SlSqHP3D7nE5aGkOwQPzJLmNL4j2Em9RGCT7fzGcpINGODfAqOy/qYk3PLPlH1pWR788 bZViwh28jHeWF6kttDvIgd+DGKfOhOA2M34GvyiQ1giM9wlSLu+aY9IAfz+UMYW5LFcm 5DCg== X-Gm-Message-State: AOAM530yjBin6pCkScCYLyOx+WWl+vjuAt/Gxp9cZBDefE9CHJp2yaTg KuKmCmgVCC1R+RBDBOsdezAA0P3hYaII/aH326c= X-Google-Smtp-Source: ABdhPJwVSkw7v8ak9ramwfszUriajPItmAK0plrYfFC2QgSDWHwS+vY3Jp0hoXfZLr39naReMAHOJV5Nm9/osUElZ1o= X-Received: by 2002:aa7:8889:0:b029:1ed:f38:4438 with SMTP id z9-20020aa788890000b02901ed0f384438mr22024866pfe.44.1615221639441; Mon, 08 Mar 2021 08:40:39 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 8 Mar 2021 11:40:38 -0500 In-Reply-To: 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.249, 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:266209 Archived-At: Drew Adams writes: > Why just a face, at all? Why not a _link_ to > help for the key sequence? Yes, why not? > (And we already have code that does that. Why > reinvent the wheel, giving it sharp corners?) You forgot to attach the patch. But in any case, a) this is not helpful and b) what "re-invented wheel" are you talking about? Do you perhaps mean a "wheel" that does this: @@ -1065,7 +1073,11 @@ substitute-command-keys (delete-char 1)) ;; Function is on a key. (delete-char (- end-point (point))) - (insert (help--key-description-fontified key))))) + (insert (if (functionp fun) + (make-text-button key nil + 'type 'help-function + 'help-args (list fun))) + (help--key-description-fontified key))))))) Does that code look correct to you?