unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Moving `substitute-command-keys' to Lisp [was: Ideas to improve the output of C-h m?]
@ 2020-05-06 17:28 Drew Adams
  0 siblings, 0 replies; only message in thread
From: Drew Adams @ 2020-05-06 17:28 UTC (permalink / raw)
  To: Stefan Kangas, Clément Pit-Claudel; +Cc: Emacs developers

Sounds good to have `substitute-command-keys'
defined in Lisp.  Thanks for working on that.
Hopefully it will have the same behavior.

FWIW, `help-fns+.el' uses a Lisp wrapper for it,
`help-substitute-command-keys' that optionally adds
(so-called) buttons for help on key descriptions
that result from `\\[...]'.

E.g. the `C-x 2' output from `\\[split-window-below]'
gets a button that links to the `describe-key' *Help*.

Perhaps that feature could be added to your Lisp
`substitute-command-keys' (in which case I'd drop my
`help-substitute-command-keys').  It'd be backward
compatible, since it just adds an optional arg - the
default behavior is vanilla `substitute-command-keys'.
___

 help-substitute-command-keys is a Lisp function in ‘help-fns+.el’.

 (help-substitute-command-keys STRING &optional ADD-HELP-BUTTONS)

 Same as `substitute-command-keys', but optionally adds buttons for help.
 Non-nil optional arg ADD-HELP-BUTTONS does that, adding buttons to key
 descriptions, which link to the key's command help.
___

The code is here:

https://www.emacswiki.org/emacs/download/help-fns%2b.el



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-06 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 17:28 Moving `substitute-command-keys' to Lisp [was: Ideas to improve the output of C-h m?] Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).