[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c,v |
Date: |
Sat, 29 Mar 2008 01:46:13 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/03/29 01:46:11
Index: src/keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.949
retrieving revision 1.950
diff -u -b -r1.949 -r1.950
--- src/keyboard.c 19 Mar 2008 17:03:23 -0000 1.949
+++ src/keyboard.c 29 Mar 2008 01:46:08 -0000 1.950
@@ -4505,6 +4505,13 @@
/* This is only for debugging. */
struct input_event last_timer_event;
+/* List of elisp functions to call, delayed because they were generated in
+ a context where Elisp could not be safely run (e.g. redisplay, signal,
+ ...). Each lement has the form (FUN . ARGS). */
+Lisp_Object pending_funcalls;
+
+extern Lisp_Object Qapply;
+
/* Check whether a timer has fired. To prevent larger problems we simply
disregard elements that are not proper timers. Do not make a circular
timer list for the time being.
@@ -4541,6 +4548,14 @@
chosen_timer = Qnil;
GCPRO3 (timers, idle_timers, chosen_timer);
+ /* First run the code that was delayed. */
+ while (CONSP (pending_funcalls))
+ {
+ Lisp_Object funcall = XCAR (pending_funcalls);
+ pending_funcalls = XCDR (pending_funcalls);
+ safe_call2 (Qapply, XCAR (funcall), XCDR (funcall));
+ }
+
if (CONSP (timers) || CONSP (idle_timers))
{
EMACS_GET_TIME (now);
@@ -11726,6 +11741,8 @@
void
syms_of_keyboard ()
{
+ pending_funcalls = Qnil;
+
Vpre_help_message = Qnil;
staticpro (&Vpre_help_message);