diff options
| author | Richard M. Stallman | 1994-01-14 20:09:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-14 20:09:37 +0000 |
| commit | bb62bd918cb213d70e87f10538b2922690d848a1 (patch) | |
| tree | 5c9581d4ba249e3af39c52c4e4fb2346b735648e /src/keyboard.c | |
| parent | 7d6031ba4862978f371cee7a1401a045513856bc (diff) | |
| download | emacs-bb62bd918cb213d70e87f10538b2922690d848a1.tar.gz emacs-bb62bd918cb213d70e87f10538b2922690d848a1.zip | |
(command_loop_1): If there's an error in the
post(pre)-command-hook, leave that hook nil.
Diffstat (limited to 'src/keyboard.c')
| -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 | { |