summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-08-31 23:09:39 +0000
committerRichard M. Stallman <rms@gnu.org>1995-08-31 23:09:39 +0000
commitad94a780a4e43e5fb88c305e393af16f04093a69 (patch)
tree348fade07737d1423623ef1bf409780aae11d7ae /src
parentb613d6fe3daa113090d5dee24e7ceae436418c13 (diff)
downloademacs-ad94a780a4e43e5fb88c305e393af16f04093a69.tar.gz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 77ed7a3ab3e..ef50a2b81fb 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5562,7 +5562,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
if (CONSP (start) && CONSP (XCONS (start)->cdr))
{
pos = POSN_BUFFER_POSN (start);
- if (INTEGERP (pos))
+ if (INTEGERP (pos)
+ && XINT (pos) >= BEG && XINT (pos) <= Z)
{
map_here = get_local_map (XINT (pos), current_buffer);
if (!EQ (map_here, orig_local_map))
@@ -6217,7 +6218,11 @@ Otherwise, that is done only if an arg is read using the minibuffer.")
{
tem = Fget (cmd, Qdisabled);
if (!NILP (tem) && !NILP (Vrun_hooks))
- return call1 (Vrun_hooks, Qdisabled_command_hook);
+ {
+ tem = Fsymbol_value (Qdisabled_command_hook);
+ if (!NILP (tem))
+ return call1 (Vrun_hooks, Qdisabled_command_hook);
+ }
}
while (1)