Mercurial > emacs
changeset 24052:157787e56b41
(read_key_sequence): In key-translation-map and
function-key-map, handle symbol with array as fn def.
In function-key-map, handle symbol with keymap as fn def,
and autoloaded definitions.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 11 Jan 1999 15:30:06 +0000 |
parents | 4307fe505e5f |
children | 551467b8a092 |
files | src/keyboard.c |
diffstat | 1 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Mon Jan 11 15:27:08 1999 +0000 +++ b/src/keyboard.c Mon Jan 11 15:30:06 1999 +0000 @@ -7401,7 +7401,21 @@ fkey_next = fkey_map; fkey_next - = get_keyelt (access_keymap (fkey_next, key, 1, 0), 0); + = get_keyelt (access_keymap (fkey_next, key, 1, 0), 1); + + /* Handle symbol with autoload definition. */ + 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 + or an array. */ + if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next)) + && (!NILP (Farrayp (XSYMBOL (keytran_next)->function)) + || !NILP (Fkeymapp (XSYMBOL (keytran_next)->function)))) + keytran_next = XSYMBOL (keytran_next)->function; #if 0 /* I didn't turn this on, because it might cause trouble for the mapping of return into C-m and tab into C-i. */ @@ -7511,15 +7525,18 @@ keytran_next = get_keyelt (access_keymap (keytran_next, key, 1, 0), 1); + /* Handle symbol with autoload definition. */ 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. */ + /* Handle a symbol whose function definition is a keymap + or an array. */ if (SYMBOLP (keytran_next) && ! NILP (Ffboundp (keytran_next)) - && !NILP (Fkeymapp (XSYMBOL (keytran_next)->function))) + && (!NILP (Farrayp (XSYMBOL (keytran_next)->function)) + || !NILP (Fkeymapp (XSYMBOL (keytran_next)->function)))) keytran_next = XSYMBOL (keytran_next)->function; /* If the key translation map gives a function, not an