comparison src/keymap.c @ 43504:20832766c3e1

(Flookup_key): Fixed problem in 2001-12-28 patch: The validation of the event type was too strict as it didn't allow string events; buffer names are used in bindings for menu-bar-select-buffer (see `menu-bar-update-buffers').
author Kim F. Storm <storm@cua.dk>
date Sun, 24 Feb 2002 00:23:20 +0000
parents b5b76b498398
children c525c7445e1b 88a2dd2ddb6e
comparison
equal deleted inserted replaced
43503:324295ebaf57 43504:20832766c3e1
1140 1140
1141 /* Turn the 8th bit of string chars into a meta modifier. */ 1141 /* Turn the 8th bit of string chars into a meta modifier. */
1142 if (XINT (c) & 0x80 && STRINGP (key)) 1142 if (XINT (c) & 0x80 && STRINGP (key))
1143 XSETINT (c, (XINT (c) | meta_modifier) & ~0x80); 1143 XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);
1144 1144
1145 if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c)) 1145 /* Allow string since binding for `menu-bar-select-buffer'
1146 includes the buffer name in the key sequence. */
1147 if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c))
1146 error ("Key sequence contains invalid event"); 1148 error ("Key sequence contains invalid event");
1147 1149
1148 cmd = access_keymap (keymap, c, t_ok, 0, 1); 1150 cmd = access_keymap (keymap, c, t_ok, 0, 1);
1149 if (idx == length) 1151 if (idx == length)
1150 RETURN_UNGCPRO (cmd); 1152 RETURN_UNGCPRO (cmd);