diff options
| author | Jim Blandy <jimb@redhat.com> | 1992-11-07 07:34:58 +0000 |
|---|---|---|
| committer | Jim Blandy <jimb@redhat.com> | 1992-11-07 07:34:58 +0000 |
| commit | 8e4dfd54039beee8118648b00be9a5c128cd23e1 (patch) | |
| tree | eaaa18149a45c632060f766ce768e8eb0b5bfa90 /src/keymap.c | |
| parent | 07d2b8de62d7ad850f520f4ded372ddcba31c141 (diff) | |
| download | emacs-8e4dfd54039beee8118648b00be9a5c128cd23e1.tar.gz | |
* keymap.c (get_keymap_1): Don't try to autoload OBJECT's function
unless the autoload form indicates that it's a keymap.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/keymap.c b/src/keymap.c index 6275fa990e2..5282711bac0 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) |
