emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99618: Make it possible to C-g in a


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99618: Make it possible to C-g in a tight bytecode loop again (bug#5680).
Date: Fri, 05 Mar 2010 18:08:18 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99618
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-03-05 18:08:18 -0500
message:
  Make it possible to C-g in a tight bytecode loop again (bug#5680).
  * lisp.h (ELSE_PENDING_SIGNALS): New macro.
  (QUIT): Use it to consolidate code and remove redundancy.
  * bytecode.c (BYTE_CODE_QUIT): Use it as well.
modified:
  src/ChangeLog
  src/bytecode.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-03-05 19:54:39 +0000
+++ b/src/ChangeLog     2010-03-05 23:08:18 +0000
@@ -1,5 +1,10 @@
 2010-03-05  Stefan Monnier  <address@hidden>
 
+       Make it possible to C-g in a tight bytecode loop again (bug#5680).
+       * lisp.h (ELSE_PENDING_SIGNALS): New macro.
+       (QUIT): Use it to consolidate code and remove redundancy.
+       * bytecode.c (BYTE_CODE_QUIT): Use it as well.
+
        * regex.c (regex_compile): Setup gl_state as well.
 
        * syntax.c (skip_chars): Setup gl_state (bug#3823).

=== modified file 'src/bytecode.c'
--- a/src/bytecode.c    2010-01-13 08:35:10 +0000
+++ b/src/bytecode.c    2010-03-05 23:08:18 +0000
@@ -393,6 +393,7 @@
        Fsignal (Qquit, Qnil);                          \
        AFTER_POTENTIAL_GC ();                          \
       }                                                        \
+    ELSE_PENDING_SIGNALS                               \
   } while (0)
 
 

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2010-01-22 09:10:04 +0000
+++ b/src/lisp.h        2010-03-05 23:08:18 +0000
@@ -1933,37 +1933,26 @@
 #ifdef SYNC_INPUT
 extern void process_pending_signals P_ ((void));
 extern int pending_signals;
-
-#define QUIT                                           \
-  do {                                                 \
-    if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))    \
-      {                                                        \
-        Lisp_Object flag = Vquit_flag;                 \
-       Vquit_flag = Qnil;                              \
-       if (EQ (Vthrow_on_input, flag))                 \
-         Fthrow (Vthrow_on_input, Qt);                 \
-       Fsignal (Qquit, Qnil);                          \
-      }                                                        \
-    else if (pending_signals)                          \
-      process_pending_signals ();                      \
-  } while (0)
-
+#define ELSE_PENDING_SIGNALS                           \
+  else if (pending_signals)                            \
+    process_pending_signals ();
 #else  /* not SYNC_INPUT */
-
-#define QUIT                                           \
-  do {                                                 \
-    if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))    \
-      {                                                        \
-        Lisp_Object flag = Vquit_flag;                 \
-       Vquit_flag = Qnil;                              \
-       if (EQ (Vthrow_on_input, flag))                 \
-         Fthrow (Vthrow_on_input, Qt);                 \
-       Fsignal (Qquit, Qnil);                          \
-      }                                                        \
-  } while (0)
-
+#define ELSE_PENDING_SIGNALS
 #endif /* not SYNC_INPUT */
 
+#define QUIT                                           \
+  do {                                                 \
+    if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))    \
+      {                                                        \
+        Lisp_Object flag = Vquit_flag;                 \
+       Vquit_flag = Qnil;                              \
+       if (EQ (Vthrow_on_input, flag))                 \
+         Fthrow (Vthrow_on_input, Qt);                 \
+       Fsignal (Qquit, Qnil);                          \
+      }                                                        \
+    ELSE_PENDING_SIGNALS                               \
+  } while (0)
+
 
 /* Nonzero if ought to quit now.  */
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]