aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-20 20:01:12 +0000
committerRichard M. Stallman1994-07-20 20:01:12 +0000
commit8a792f3ab26adaea3790d283a55635a1dcfe69d8 (patch)
treec53012b1a135c9cd1d554d2bfb8d24f164c15b05 /src
parent19dff8dc59da178d18cee1dbe3207be80d69866c (diff)
downloademacs-8a792f3ab26adaea3790d283a55635a1dcfe69d8.tar.gz
emacs-8a792f3ab26adaea3790d283a55635a1dcfe69d8.zip
(Vdeferred_action_list, Vdeferred_action_function): New variables.
(command_loop_1): Handle them. (syms_of_keyboard): Set up Lisp variables.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 442ad273b2f..391d8718f78 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -297,6 +297,13 @@ Lisp_Object Qpre_command_hook, Qpost_command_hook;
297Lisp_Object Vpre_command_hook, Vpost_command_hook; 297Lisp_Object Vpre_command_hook, Vpost_command_hook;
298Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; 298Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal;
299 299
300/* List of deferred actions to be performed at a later time.
301 The precise format isn't relevant here; we just check whether it is nil. */
302Lisp_Object Vdeferred_action_list;
303
304/* Function to call to handle deferred actions, when there are any. */
305Lisp_Object Vdeferred_action_function;
306
300/* File in which we write all commands we read. */ 307/* File in which we write all commands we read. */
301FILE *dribble; 308FILE *dribble;
302 309
@@ -957,6 +964,9 @@ command_loop_1 ()
957 if (!NILP (XSYMBOL (Qpost_command_hook)->value) && !NILP (Vrun_hooks)) 964 if (!NILP (XSYMBOL (Qpost_command_hook)->value) && !NILP (Vrun_hooks))
958 safe_run_hooks (Qpost_command_hook); 965 safe_run_hooks (Qpost_command_hook);
959 966
967 if (!NILP (Vdeferred_action_list))
968 call0 (Vdeferred_action_function);
969
960 /* Do this after running Vpost_command_hook, for consistency. */ 970 /* Do this after running Vpost_command_hook, for consistency. */
961 last_command = this_command; 971 last_command = this_command;
962 972
@@ -1227,6 +1237,9 @@ command_loop_1 ()
1227 if (!NILP (XSYMBOL (Qpost_command_hook)->value) && !NILP (Vrun_hooks)) 1237 if (!NILP (XSYMBOL (Qpost_command_hook)->value) && !NILP (Vrun_hooks))
1228 safe_run_hooks (Qpost_command_hook); 1238 safe_run_hooks (Qpost_command_hook);
1229 1239
1240 if (!NILP (Vdeferred_action_list))
1241 call0 (Vdeferred_action_function);
1242
1230 /* If there is a prefix argument, 1243 /* If there is a prefix argument,
1231 1) We don't want last_command to be ``universal-argument'' 1244 1) We don't want last_command to be ``universal-argument''
1232 (that would be dumb), so don't set last_command, 1245 (that would be dumb), so don't set last_command,
@@ -6231,6 +6244,17 @@ Each element should have the form (N . SYMBOL) where N is the\n\
6231numeric keysym code (sans the \"system-specific\" bit 1<<28)\n\ 6244numeric keysym code (sans the \"system-specific\" bit 1<<28)\n\
6232and SYMBOL is its name."); 6245and SYMBOL is its name.");
6233 Vsystem_key_alist = Qnil; 6246 Vsystem_key_alist = Qnil;
6247
6248 DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list,
6249 "List of deferred actions to be performed at a later time.\n\
6250The precise format isn't relevant here; we just check whether it is nil.");
6251 Vdeferred_action_list = Qnil;
6252
6253 DEFVAR_LISP ("deferred-action-function", &Vdeferred_action_function,
6254 "Function to call to handle deferred actions, after each command.\n\
6255This function is called with no arguments after each command\n\
6256whenever `deferred-action-list' is non-nil.");
6257 Vdeferred_action_function = Qnil;
6234} 6258}
6235 6259
6236keys_of_keyboard () 6260keys_of_keyboard ()