diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 24988923e70..7bd709ae1d4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -912,7 +912,7 @@ command_loop_1 () | |||
| 912 | 912 | ||
| 913 | /* Make sure this hook runs after commands that get errors and | 913 | /* Make sure this hook runs after commands that get errors and |
| 914 | throw to top level. */ | 914 | throw to top level. */ |
| 915 | if (!NILP (Vpost_command_hook)) | 915 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) |
| 916 | { | 916 | { |
| 917 | /* If we get an error during the post-command-hook, | 917 | /* If we get an error during the post-command-hook, |
| 918 | cause post-command-hook to be nil. */ | 918 | cause post-command-hook to be nil. */ |
| @@ -1039,7 +1039,7 @@ command_loop_1 () | |||
| 1039 | /* Execute the command. */ | 1039 | /* Execute the command. */ |
| 1040 | 1040 | ||
| 1041 | this_command = cmd; | 1041 | this_command = cmd; |
| 1042 | if (!NILP (Vpre_command_hook)) | 1042 | if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) |
| 1043 | { | 1043 | { |
| 1044 | /* If we get an error during the pre-command-hook, | 1044 | /* If we get an error during the pre-command-hook, |
| 1045 | cause pre-command-hook to be nil. */ | 1045 | cause pre-command-hook to be nil. */ |
| @@ -1176,7 +1176,7 @@ command_loop_1 () | |||
| 1176 | } | 1176 | } |
| 1177 | directly_done: ; | 1177 | directly_done: ; |
| 1178 | 1178 | ||
| 1179 | if (!NILP (Vpost_command_hook)) | 1179 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) |
| 1180 | { | 1180 | { |
| 1181 | /* If we get an error during the post-command-hook, | 1181 | /* If we get an error during the post-command-hook, |
| 1182 | cause post-command-hook to be nil. */ | 1182 | cause post-command-hook to be nil. */ |
| @@ -1204,7 +1204,7 @@ command_loop_1 () | |||
| 1204 | this_command_key_count = 0; | 1204 | this_command_key_count = 0; |
| 1205 | } | 1205 | } |
| 1206 | 1206 | ||
| 1207 | if (!NILP (current_buffer->mark_active)) | 1207 | if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) |
| 1208 | { | 1208 | { |
| 1209 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) | 1209 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) |
| 1210 | { | 1210 | { |
| @@ -4522,7 +4522,8 @@ read_key_sequence (keybuf, bufsize, prompt) | |||
| 4522 | if (t + 1 >= bufsize) | 4522 | if (t + 1 >= bufsize) |
| 4523 | error ("key sequence too long"); | 4523 | error ("key sequence too long"); |
| 4524 | /* Run the Lucid hook. */ | 4524 | /* Run the Lucid hook. */ |
| 4525 | call1 (Vrun_hooks, Qactivate_menubar_hook); | 4525 | if (!NILP (Vrun_hooks)) |
| 4526 | call1 (Vrun_hooks, Qactivate_menubar_hook); | ||
| 4526 | /* If it has changed current-menubar from previous value, | 4527 | /* If it has changed current-menubar from previous value, |
| 4527 | really recompute the menubar from the value. */ | 4528 | really recompute the menubar from the value. */ |
| 4528 | if (! NILP (Vlucid_menu_bar_dirty_flag)) | 4529 | if (! NILP (Vlucid_menu_bar_dirty_flag)) |
| @@ -4993,7 +4994,7 @@ Otherwise, that is done only if an arg is read using the minibuffer.") | |||
| 4993 | if (XTYPE (cmd) == Lisp_Symbol) | 4994 | if (XTYPE (cmd) == Lisp_Symbol) |
| 4994 | { | 4995 | { |
| 4995 | tem = Fget (cmd, Qdisabled); | 4996 | tem = Fget (cmd, Qdisabled); |
| 4996 | if (!NILP (tem)) | 4997 | if (!NILP (tem) && !NILP (Vrun_hooks)) |
| 4997 | return call1 (Vrun_hooks, Qdisabled_command_hook); | 4998 | return call1 (Vrun_hooks, Qdisabled_command_hook); |
| 4998 | } | 4999 | } |
| 4999 | 5000 | ||