changeset 1566:892c9f61217a

* keymap.c (get_keymap_1): Don't try to autoload OBJECT's function unless the autoload form indicates that it's a keymap.
author Jim Blandy <jimb@redhat.com>
date Sat, 07 Nov 1992 07:34:58 +0000
parents a681f63f93fa
children c0c9fc68a006
files src/keymap.c
diffstat 1 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sat Nov 07 07:07:16 1992 +0000
+++ b/src/keymap.c	Sat Nov 07 07:34:58 1992 +0000
@@ -205,19 +205,26 @@
   if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap))
     return tem;
 
-  /* Should we do an autoload?  */
+  /* Should we do an autoload?  Autoload forms for keymaps have
+     Qkeymap as their fifth element.  */
   if (autoload
       && XTYPE (object) == Lisp_Symbol
       && CONSP (tem)
       && EQ (XCONS (tem)->car, Qautoload))
     {
-      struct gcpro gcpro1, gcpro2;
+      Lisp_Object tail;
+
+      tail = Fnth (make_number (4), tem);
+      if (EQ (tail, Qkeymap))
+	{
+	  struct gcpro gcpro1, gcpro2;
 
-      GCPRO2 (tem, object)
-      do_autoload (tem, object);
-      UNGCPRO;
+	  GCPRO2 (tem, object)
+	    do_autoload (tem, object);
+	  UNGCPRO;
 
-      goto autoload_retry;
+	  goto autoload_retry;
+	}
     }
 
   if (error)