Subject: bug#74903: [PATCH] Add function to show table of keys when describing keymap variable

From: Stefan Monnier <[email-masked]>
Date: Mon, 16 Dec 2024 22:03:22 -0500

> 1. Allow users to opt-in to have C-h v foo-keymap RET show a table of key
> bindings in addition to the formatting as S-expression. This fits well into
> the existing help-fns mechanism. The patch I submitted implements
> a prototype.
>
> 2. In help-mode, bind a single-char-key like "K" to a command that will
> allow users to easily switch from describing a variable as variable to
> describing it as keymap a la describe-keymap.

The table is a bit redundant with the s-exp representation and I'm not
sure we want to spend all this time&space printing out a large keymap,
but maybe we could use the `help-fns-describe-variable-functions`
mechanism to add a one-liner that can be clicked to get to the
keymap-specific description, a bit like Custom vars have a "You can
customize this variable" link.
WDYT?

[ There is also something to be said to spice up `describe-keymap` so it
  can be used to *modify* a keymap.  But that comes with many more
  difficulties (the main one being how to save those modifications so
  they survive a restart).  ]

        Stefan