comparison src/keyboard.c @ 12979:15f32c044bb8

(Fcommand_execute): Ignore `disabled' property on commands if `disable-command-hook' is nil. (read_key_sequence): Validate the event position before calling get_local_map.
author Richard M. Stallman <rms@gnu.org>
date Thu, 31 Aug 1995 23:09:39 +0000
parents 271dc8563a91
children 077bb437f649
comparison
equal deleted inserted replaced
12978:88a47d611c4a 12979:15f32c044bb8
5560 localized_local_map = 1; 5560 localized_local_map = 1;
5561 start = EVENT_START (key); 5561 start = EVENT_START (key);
5562 if (CONSP (start) && CONSP (XCONS (start)->cdr)) 5562 if (CONSP (start) && CONSP (XCONS (start)->cdr))
5563 { 5563 {
5564 pos = POSN_BUFFER_POSN (start); 5564 pos = POSN_BUFFER_POSN (start);
5565 if (INTEGERP (pos)) 5565 if (INTEGERP (pos)
5566 && XINT (pos) >= BEG && XINT (pos) <= Z)
5566 { 5567 {
5567 map_here = get_local_map (XINT (pos), current_buffer); 5568 map_here = get_local_map (XINT (pos), current_buffer);
5568 if (!EQ (map_here, orig_local_map)) 5569 if (!EQ (map_here, orig_local_map))
5569 { 5570 {
5570 orig_local_map = map_here; 5571 orig_local_map = map_here;
6215 6216
6216 if (SYMBOLP (cmd)) 6217 if (SYMBOLP (cmd))
6217 { 6218 {
6218 tem = Fget (cmd, Qdisabled); 6219 tem = Fget (cmd, Qdisabled);
6219 if (!NILP (tem) && !NILP (Vrun_hooks)) 6220 if (!NILP (tem) && !NILP (Vrun_hooks))
6220 return call1 (Vrun_hooks, Qdisabled_command_hook); 6221 {
6222 tem = Fsymbol_value (Qdisabled_command_hook);
6223 if (!NILP (tem))
6224 return call1 (Vrun_hooks, Qdisabled_command_hook);
6225 }
6221 } 6226 }
6222 6227
6223 while (1) 6228 while (1)
6224 { 6229 {
6225 final = Findirect_function (cmd); 6230 final = Findirect_function (cmd);