Subject: bug#30660: mention describe-bindings on (info "(emacs) Keymaps")

From: Robert Pluim <[email-masked]>
Date: Thu, 17 Oct 2019 14:07:10 +0200

>>>>> On Thu, 17 Oct 2019 11:42:25 +0200, Stefan Kangas <[email-masked]> said:

    Stefan> * lisp/help-fns.el (describe-keymap): New function to show key
    Stefan> bindings for a given keymap.  (Bug#30660)
    Stefan> * doc/lispref/keymaps.texi (Scanning Keymaps): Document it.
    Stefan> * etc/NEWS: Announce it.

    Stefan> * test/lisp/help-fns-tests.el (help-fns-test-describe-keymap/symbol)
    Stefan> (help-fns-test-describe-keymap/value)
    Stefan> (help-fns-test-describe-keymap/value+search-symbols)
    Stefan> (help-fns-test-describe-keymap/symbol+search-symbols)
    Stefan> (help-fns-test-describe-keymap/not-keymap)
    Stefan> (help-fns-test-describe-keymap/let-bound)
    Stefan> (help-fns-test-describe-keymap/dynamically-bound-no-file): New tests.
    Stefan> ---
    Stefan>  doc/lispref/keymaps.texi    | 12 ++++++
    Stefan>  etc/NEWS                    |  3 ++
    Stefan>  lisp/help-fns.el            | 73 +++++++++++++++++++++++++++++++++++++
    Stefan>  test/lisp/help-fns-tests.el | 41 +++++++++++++++++++++
    Stefan>  4 files changed, 129 insertions(+)

    Stefan> diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
    Stefan> index 532e537026..569e6137e6 100644
    Stefan> --- a/doc/lispref/keymaps.texi
    Stefan> +++ b/doc/lispref/keymaps.texi
    Stefan> @@ -2004,6 +2004,18 @@ Scanning Keymaps
    Stefan>  instead of the current buffer's.
    Stefan>  @end deffn
 
    Stefan> +@deffn Command describe-keymap keymap &optional search-symbols
    Stefan> +This function creates a listing of all key bindings in variable

s/variable//

    Stefan> +@var{keymap}, and displays it in a buffer named @file{*Help*}.  When
    Stefan> +called interactively, prompt for a variable that has a keymap value.
    Stefan> +
    Stefan> +If optional argument @var{search-symbols} is non-nil, and @var{keymap}
    Stefan> +is not a symbol, search all variables for one whose value is KEYMAP

@var{keymap}

Iʼm not clear on why it needs such a convoluted API, but I guess itʼs
useful to someone. Could the searching not be split into a
'find-keymap' function?

Robert