]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fremap_command): Return nil if arg is not a symbol.
authorKim F. Storm <storm@cua.dk>
Tue, 11 Feb 2003 14:35:24 +0000 (14:35 +0000)
committerKim F. Storm <storm@cua.dk>
Tue, 11 Feb 2003 14:35:24 +0000 (14:35 +0000)
src/keymap.c

index 2f8a44cfb3d5aad51629f97bec0f54cbd337c7ff..3c8c7a3ce3faf602bc2075cccfe76358db059985 100644 (file)
@@ -1070,10 +1070,13 @@ the front of KEYMAP.  */)
 
 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);
 }