From 8e4dfd54039beee8118648b00be9a5c128cd23e1 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sat, 7 Nov 1992 07:34:58 +0000 Subject: [PATCH] * keymap.c (get_keymap_1): Don't try to autoload OBJECT's function unless the autoload form indicates that it's a keymap. --- src/keymap.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index 6275fa990e..5282711bac 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -205,19 +205,26 @@ get_keymap_1 (object, error, autoload) 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; - GCPRO2 (tem, object) - do_autoload (tem, object); - UNGCPRO; + tail = Fnth (make_number (4), tem); + if (EQ (tail, Qkeymap)) + { + struct gcpro gcpro1, gcpro2; + + GCPRO2 (tem, object) + do_autoload (tem, object); + UNGCPRO; - goto autoload_retry; + goto autoload_retry; + } } if (error) -- GitLab