diff options
| author | Jim Blandy | 1992-11-07 07:34:58 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-11-07 07:34:58 +0000 |
| commit | 8e4dfd54039beee8118648b00be9a5c128cd23e1 (patch) | |
| tree | eaaa18149a45c632060f766ce768e8eb0b5bfa90 /src | |
| parent | 07d2b8de62d7ad850f520f4ded372ddcba31c141 (diff) | |
| download | emacs-8e4dfd54039beee8118648b00be9a5c128cd23e1.tar.gz emacs-8e4dfd54039beee8118648b00be9a5c128cd23e1.zip | |
* 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')
| -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) | |||
| 205 | if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap)) | 205 | if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap)) |
| 206 | return tem; | 206 | return tem; |
| 207 | 207 | ||
| 208 | /* Should we do an autoload? */ | 208 | /* Should we do an autoload? Autoload forms for keymaps have |
| 209 | Qkeymap as their fifth element. */ | ||
| 209 | if (autoload | 210 | if (autoload |
| 210 | && XTYPE (object) == Lisp_Symbol | 211 | && XTYPE (object) == Lisp_Symbol |
| 211 | && CONSP (tem) | 212 | && CONSP (tem) |
| 212 | && EQ (XCONS (tem)->car, Qautoload)) | 213 | && EQ (XCONS (tem)->car, Qautoload)) |
| 213 | { | 214 | { |
| 214 | struct gcpro gcpro1, gcpro2; | 215 | Lisp_Object tail; |
| 215 | 216 | ||
| 216 | GCPRO2 (tem, object) | 217 | tail = Fnth (make_number (4), tem); |
| 217 | do_autoload (tem, object); | 218 | if (EQ (tail, Qkeymap)) |
| 218 | UNGCPRO; | 219 | { |
| 220 | struct gcpro gcpro1, gcpro2; | ||
| 221 | |||
| 222 | GCPRO2 (tem, object) | ||
| 223 | do_autoload (tem, object); | ||
| 224 | UNGCPRO; | ||
| 219 | 225 | ||
| 220 | goto autoload_retry; | 226 | goto autoload_retry; |
| 227 | } | ||
| 221 | } | 228 | } |
| 222 | 229 | ||
| 223 | if (error) | 230 | if (error) |