changeset 49720:e4fcec69ba69

(Fremap_command): Return nil if arg is not a symbol.
author Kim F. Storm <storm@cua.dk>
date Tue, 11 Feb 2003 14:35:24 +0000
parents d5b45b7a0eff
children 1147f4170a4f
files src/keymap.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Tue Feb 11 14:35:09 2003 +0000
+++ b/src/keymap.c	Tue Feb 11 14:35:24 2003 +0000
@@ -1070,10 +1070,13 @@
 
 DEFUN ("remap-command", Fremap_command, Sremap_command, 1, 1, 0,
        doc: /* Return the remapping for command COMMAND in current keymaps.
-Returns nil if COMMAND is not remapped.  */)
+Returns nil if COMMAND is not remapped (or not a symbol).  */)
      (command)
      Lisp_Object command;
 {
+  if (!SYMBOLP (command))
+    return Qnil;
+
   ASET (remap_command_vector, 1, command);
   return Fkey_binding (remap_command_vector, Qnil, Qt);
 }