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

From: Drew Adams <[email-masked]>
Date: Sat, 24 Aug 2019 08:06:19 -0700 (PDT)

> I've now packaged up a proposed patch

Thanks for working on this.  Looks mostly OK to me.
However:

1. I object to the use of `C-h M' as the key binding.
   Please use `C-h M-k'.  The letter `M/m' has other,
   and more useful, associations (mode, mail, .  And
   `M' currently is translated to the often used
   `C-h m'.  `K' is often associated in Emacs with
   "key" or "kill".  And it's as easy to use Meta as
   it is to use Shift.

   [And users of `help-fns+.el', which has the same
   command but with additional features, are used to
   `C-h M-k'.  Because the vanilla version will lack
   those additional features I'll continue to maintain
   `describe-keymap' in `help-fns+.el'.  If those
   features are also added to vanilla Emacs someday
   then I won't need to maintain it.]

2. When testing with `emacs -Q' (but perhaps because
   I ran into the error of #3?), and also using
   `C-h f' etc., I somehow ended up with two [back]
   links at the bottom of *Help*, like this:

   [back]

   [back]

   Please check that what you end up with doesn't
   lead to this.

3. The code raises this error when KEYMAP is not a
   symbol and SEARCH-SYMBOLS-P is nil, because
   FILE-NAME is nil.

(describe-keymap isearch-mode-map) => 

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-nondirectory(nil)
  (if (eq file-name (quote C-source)) "C source code" (file-name-nondirectory file-name))
  ...

4. When fixing that bug, please be sure not to print
   a generated name ("KEYMAP OBJECT (no variable)")
   for a non-existent or not found variable.

5. When fixing that bug, if the keymap is fine, and
   it has a variable that is not defined in a file,
   don't try to print a file for it.  Don't try to
   print a file for the non-variable case either.

Wrt 3-5: It's not right to blindly print a variable
name and a file for it.  The code needs to handle
cases such as variable not given, no variable at all,
and variable not defined in a file.