Commit 8e4dfd54 authored by Jim Blandy's avatar Jim Blandy

* keymap.c (get_keymap_1): Don't try to autoload OBJECT's function

	unless the autoload form indicates that it's a keymap.
parent 07d2b8de
...@@ -205,19 +205,26 @@ get_keymap_1 (object, error, autoload) ...@@ -205,19 +205,26 @@ get_keymap_1 (object, error, autoload)
if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap)) if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap))
return tem; return tem;
/* Should we do an autoload? */ /* Should we do an autoload? Autoload forms for keymaps have
Qkeymap as their fifth element. */
if (autoload if (autoload
&& XTYPE (object) == Lisp_Symbol && XTYPE (object) == Lisp_Symbol
&& CONSP (tem) && CONSP (tem)
&& EQ (XCONS (tem)->car, Qautoload)) && EQ (XCONS (tem)->car, Qautoload))
{ {
struct gcpro gcpro1, gcpro2; Lisp_Object tail;
GCPRO2 (tem, object) tail = Fnth (make_number (4), tem);
do_autoload (tem, object); if (EQ (tail, Qkeymap))
struct gcpro gcpro1, gcpro2;
GCPRO2 (tem, object)
do_autoload (tem, object);
goto autoload_retry; goto autoload_retry;
} }
if (error) if (error)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment