Mercurial > emacs
changeset 24015:2b8d4cd758b7
(read_key_sequence): Tell get_keyelt to look handle autoloads.
Handle symbols defined as keymaps, and autoloaded keymaps.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 06 Jan 1999 23:54:44 +0000 |
parents | 0997bcfd8827 |
children | 43344f47a865 |
files | src/keyboard.c |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Wed Jan 06 22:46:20 1999 +0000 +++ b/src/keyboard.c Wed Jan 06 23:54:44 1999 +0000 @@ -7509,10 +7509,21 @@ keytran_next = keytran_map; keytran_next - = get_keyelt (access_keymap (keytran_next, key, 1, 0), 0); - + = get_keyelt (access_keymap (keytran_next, key, 1, 0), 1); + + if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next)) + && CONSP (XSYMBOL (keytran_next)->function) + && EQ (XCONS (XSYMBOL (keytran_next)->function)->car, Qautoload)) + do_autoload (XSYMBOL (keytran_next)->function, + keytran_next); + + /* Handle a symbol whose function definition is a keymap. */ + if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next)) + && !NILP (Fkeymapp (XSYMBOL (keytran_next)->function))) + keytran_next = XSYMBOL (keytran_next)->function; + /* If the key translation map gives a function, not an - array, then call the function with no args and use + array, then call the function with one arg and use its value instead. */ if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next)) && keytran_end == t)