diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 743bcdfccd2..d75f48e21aa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -904,7 +904,17 @@ command_loop_1 () | |||
| 904 | /* Make sure this hook runs after commands that get errors and | 904 | /* Make sure this hook runs after commands that get errors and |
| 905 | throw to top level. */ | 905 | throw to top level. */ |
| 906 | if (!NILP (Vpost_command_hook)) | 906 | if (!NILP (Vpost_command_hook)) |
| 907 | call1 (Vrun_hooks, Qpost_command_hook); | 907 | { |
| 908 | Lisp_Object tem; | ||
| 909 | /* If we get an error during the post-command-hook, | ||
| 910 | cause post-command-hook to be nil. */ | ||
| 911 | tem = Vpost_command_hook; | ||
| 912 | Vpost_command_hook = Qnil; | ||
| 913 | |||
| 914 | call1 (Vrun_hooks, Qpost_command_hook); | ||
| 915 | |||
| 916 | Vpost_command_hook = tem; | ||
| 917 | } | ||
| 908 | 918 | ||
| 909 | while (1) | 919 | while (1) |
| 910 | { | 920 | { |
| @@ -1047,7 +1057,17 @@ command_loop_1 () | |||
| 1047 | 1057 | ||
| 1048 | this_command = cmd; | 1058 | this_command = cmd; |
| 1049 | if (!NILP (Vpre_command_hook)) | 1059 | if (!NILP (Vpre_command_hook)) |
| 1050 | call1 (Vrun_hooks, Qpre_command_hook); | 1060 | { |
| 1061 | Lisp_Object tem; | ||
| 1062 | /* If we get an error during the pre-command-hook, | ||
| 1063 | cause pre-command-hook to be nil. */ | ||
| 1064 | tem = Vpre_command_hook; | ||
| 1065 | Vpre_command_hook = Qnil; | ||
| 1066 | |||
| 1067 | call1 (Vrun_hooks, Qpre_command_hook); | ||
| 1068 | |||
| 1069 | Vpre_command_hook = tem; | ||
| 1070 | } | ||
| 1051 | 1071 | ||
| 1052 | if (NILP (this_command)) | 1072 | if (NILP (this_command)) |
| 1053 | { | 1073 | { |