unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12174: 24.1.50; C-h f and non-symbol remap targets
@ 2012-08-10 21:55 Christopher Schmidt
  2012-08-14 18:12 ` Christopher Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Schmidt @ 2012-08-10 21:55 UTC (permalink / raw)
  To: 12174

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

    (global-set-key [remap write-file] (lambda () (interactive) 'rms))
    C-h f write-file RET

This yields in an error because help-fns--key-bindings expects
(command-remapping 'write-file) to be a symbol.

Here is a patch that abbreviates non-symbol remap targets with "??".
This is consistent with what describe-bindings displays.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: help-fns--key-bindings.diff --]
[-- Type: text/x-diff, Size: 891 bytes --]

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-10 21:03:10 +0000
+++ lisp/ChangeLog	2012-08-10 21:53:48 +0000
@@ -1,3 +1,8 @@
+2012-08-10  Christopher Schmidt  <christopher@ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets with ?? (Bug#).
+
 2012-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* emacs-lisp/rx.el (rx-constituents): Don't define as constant.

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-10 21:28:18 +0000
@@ -398,7 +398,7 @@
                   (push key non-modified-keys)))
             (when remapped
               (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
+              (princ (if (symbolp remapped) (symbol-name remapped) "??"))
               (princ "'.\n"))
 
             (when keys


[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


        Christopher

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-08-22  7:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10 21:55 bug#12174: 24.1.50; C-h f and non-symbol remap targets Christopher Schmidt
2012-08-14 18:12 ` Christopher Schmidt
2012-08-15  2:38   ` Stefan Monnier
2012-08-15  8:33     ` Christopher Schmidt
2012-08-22  7:02       ` Glenn Morris
2012-08-22  7:21         ` Dani Moncayo
2012-08-22  7:24           ` Glenn Morris

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).