bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Christopher Schmidt
Subject: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Fri, 10 Aug 2012 22:55:42 +0100 (BST)

    (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.
=== 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

        Christopher

reply via email to

[Prev in Thread] Current Thread [Next in Thread]