Subject: bug#12174: 24.1.50; C-h f and non-symbol remap targets

From: Christopher Schmidt <[email-masked]>
Date: Wed, 15 Aug 2012 09:33:41 +0100 (BST)

Stefan Monnier <[email-masked]> writes:
> Actually, ?? is a bad choice, since it seems to imply that Emacs
> doesn't even know what it's remapped to, whereas Emacs does know very
> well, it just doesn't want to print it out in full because it would be
> ugly and too verbose.  So I suggest we replace "??" with something
> like "an anonymous command".
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-15 07:58:34 +0000
+++ lisp/ChangeLog	2012-08-15 08:26:41 +0000
@@ -1,3 +1,8 @@
+2012-08-15  Christopher Schmidt  <[email-masked]>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets (Bug#12174).
+
 2012-08-15  Chong Yidong  <[email-masked]>
 
 	* frame.el (set-frame-font): Accept font objects.

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-15 08:27:33 +0000
@@ -397,9 +397,11 @@
               (if (member (event-modifiers (aref key 0)) '(nil (shift)))
                   (push key non-modified-keys)))
             (when remapped
-              (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
-              (princ "'.\n"))
+              (princ "Its keys are remapped to ")
+              (princ (if (symbolp remapped)
+			 (concat "`" (symbol-name remapped) "'")
+		       "an anonymous command"))
+              (princ ".\n"))
 
             (when keys
               (princ (if remapped

        Christopher