[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: Consistent face for keys in *Help* and `substitute-

From: Stefan Kangas
Subject: RE: [External] : Re: Consistent face for keys in *Help* and `substitute-command-keys'
Date: Mon, 8 Mar 2021 11:40:38 -0500

Drew Adams <drew.adams@oracle.com> 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]