aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-01-06 23:54:44 +0000
committerRichard M. Stallman1999-01-06 23:54:44 +0000
commite83f6bb0746d9c18016e5eb31259b0fb3eba4d6c (patch)
tree0af4803fc69395542ff3cf2ce05ca1e301bbaea9
parent5ffaf437c9e3f3cae356631f16ee7c2bf6830202 (diff)
downloademacs-e83f6bb0746d9c18016e5eb31259b0fb3eba4d6c.tar.gz
emacs-e83f6bb0746d9c18016e5eb31259b0fb3eba4d6c.zip
(read_key_sequence): Tell get_keyelt to look handle autoloads.
Handle symbols defined as keymaps, and autoloaded keymaps.
-rw-r--r--src/keyboard.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 7ba7f0a6319..a8a620a4e53 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7509,10 +7509,21 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
7509 keytran_next = keytran_map; 7509 keytran_next = keytran_map;
7510 7510
7511 keytran_next 7511 keytran_next
7512 = get_keyelt (access_keymap (keytran_next, key, 1, 0), 0); 7512 = get_keyelt (access_keymap (keytran_next, key, 1, 0), 1);
7513 7513
7514 if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next))
7515 && CONSP (XSYMBOL (keytran_next)->function)
7516 && EQ (XCONS (XSYMBOL (keytran_next)->function)->car, Qautoload))
7517 do_autoload (XSYMBOL (keytran_next)->function,
7518 keytran_next);
7519
7520 /* Handle a symbol whose function definition is a keymap. */
7521 if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next))
7522 && !NILP (Fkeymapp (XSYMBOL (keytran_next)->function)))
7523 keytran_next = XSYMBOL (keytran_next)->function;
7524
7514 /* If the key translation map gives a function, not an 7525 /* If the key translation map gives a function, not an
7515 array, then call the function with no args and use 7526 array, then call the function with one arg and use
7516 its value instead. */ 7527 its value instead. */
7517 if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next)) 7528 if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next))
7518 && keytran_end == t) 7529 && keytran_end == t)