450 |
Lisp_Object Qpre_command_hook, Vpre_command_hook; |
Lisp_Object Qpre_command_hook, Vpre_command_hook; |
451 |
Lisp_Object Qpost_command_hook, Vpost_command_hook; |
Lisp_Object Qpost_command_hook, Vpost_command_hook; |
452 |
Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; |
Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; |
|
/* Hook run after a command if there's no more input soon. */ |
|
|
Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook; |
|
|
|
|
|
/* Delay time in microseconds before running post-command-idle-hook. */ |
|
|
EMACS_INT post_command_idle_delay; |
|
453 |
|
|
454 |
/* List of deferred actions to be performed at a later time. |
/* List of deferred actions to be performed at a later time. |
455 |
The precise format isn't relevant here; we just check whether it is nil. */ |
The precise format isn't relevant here; we just check whether it is nil. */ |
1442 |
|
|
1443 |
if (!NILP (Vdeferred_action_list)) |
if (!NILP (Vdeferred_action_list)) |
1444 |
safe_run_hooks (Qdeferred_action_function); |
safe_run_hooks (Qdeferred_action_function); |
|
|
|
|
if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) |
|
|
{ |
|
|
if (NILP (Vunread_command_events) |
|
|
&& NILP (Vunread_input_method_events) |
|
|
&& NILP (Vunread_post_input_method_events) |
|
|
&& NILP (Vexecuting_kbd_macro) |
|
|
&& !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) |
|
|
safe_run_hooks (Qpost_command_idle_hook); |
|
|
} |
|
1445 |
} |
} |
1446 |
|
|
1447 |
Vmemory_full = Qnil; |
Vmemory_full = Qnil; |
1807 |
if (!NILP (Vdeferred_action_list)) |
if (!NILP (Vdeferred_action_list)) |
1808 |
safe_run_hooks (Qdeferred_action_function); |
safe_run_hooks (Qdeferred_action_function); |
1809 |
|
|
|
if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) |
|
|
{ |
|
|
if (NILP (Vunread_command_events) |
|
|
&& NILP (Vunread_input_method_events) |
|
|
&& NILP (Vunread_post_input_method_events) |
|
|
&& NILP (Vexecuting_kbd_macro) |
|
|
&& !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) |
|
|
safe_run_hooks (Qpost_command_idle_hook); |
|
|
} |
|
|
|
|
1810 |
/* If there is a prefix argument, |
/* If there is a prefix argument, |
1811 |
1) We don't want Vlast_command to be ``universal-argument'' |
1) We don't want Vlast_command to be ``universal-argument'' |
1812 |
(that would be dumb), so don't set Vlast_command, |
(that would be dumb), so don't set Vlast_command, |
10830 |
Qpost_command_hook = intern ("post-command-hook"); |
Qpost_command_hook = intern ("post-command-hook"); |
10831 |
staticpro (&Qpost_command_hook); |
staticpro (&Qpost_command_hook); |
10832 |
|
|
|
Qpost_command_idle_hook = intern ("post-command-idle-hook"); |
|
|
staticpro (&Qpost_command_idle_hook); |
|
|
|
|
10833 |
Qdeferred_action_function = intern ("deferred-action-function"); |
Qdeferred_action_function = intern ("deferred-action-function"); |
10834 |
staticpro (&Qdeferred_action_function); |
staticpro (&Qdeferred_action_function); |
10835 |
|
|
11275 |
might happen repeatedly and make Emacs nonfunctional. */); |
might happen repeatedly and make Emacs nonfunctional. */); |
11276 |
Vpost_command_hook = Qnil; |
Vpost_command_hook = Qnil; |
11277 |
|
|
|
DEFVAR_LISP ("post-command-idle-hook", &Vpost_command_idle_hook, |
|
|
doc: /* Normal hook run after each command is executed, if idle. |
|
|
Errors running the hook are caught and ignored. */); |
|
|
Vpost_command_idle_hook = Qnil; |
|
|
|
|
|
DEFVAR_INT ("post-command-idle-delay", &post_command_idle_delay, |
|
|
doc: /* Delay time before running `post-command-idle-hook'. |
|
|
This is measured in microseconds. */); |
|
|
post_command_idle_delay = 100000; |
|
|
|
|
11278 |
#if 0 |
#if 0 |
11279 |
DEFVAR_LISP ("echo-area-clear-hook", ..., |
DEFVAR_LISP ("echo-area-clear-hook", ..., |
11280 |
doc: /* Normal hook run when clearing the echo area. */); |
doc: /* Normal hook run when clearing the echo area. */); |