aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorStefan Monnier2010-03-05 18:08:18 -0500
committerStefan Monnier2010-03-05 18:08:18 -0500
commitc0335e02ec7778c10fa110d8953f15990110e04b (patch)
tree5590b260ef5def04995f56862de4cde46f19ef59 /src/lisp.h
parente8defde36d0d4ab3dadd7f4a561a8c47ce110f9b (diff)
downloademacs-c0335e02ec7778c10fa110d8953f15990110e04b.tar.gz
emacs-c0335e02ec7778c10fa110d8953f15990110e04b.zip
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.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 7032a3f48f4..7f5d5df66c6 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1933,22 +1933,12 @@ extern char *stack_bottom;
1933#ifdef SYNC_INPUT 1933#ifdef SYNC_INPUT
1934extern void process_pending_signals P_ ((void)); 1934extern void process_pending_signals P_ ((void));
1935extern int pending_signals; 1935extern int pending_signals;
1936 1936#define ELSE_PENDING_SIGNALS \
1937#define QUIT \ 1937 else if (pending_signals) \
1938 do { \ 1938 process_pending_signals ();
1939 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
1940 { \
1941 Lisp_Object flag = Vquit_flag; \
1942 Vquit_flag = Qnil; \
1943 if (EQ (Vthrow_on_input, flag)) \
1944 Fthrow (Vthrow_on_input, Qt); \
1945 Fsignal (Qquit, Qnil); \
1946 } \
1947 else if (pending_signals) \
1948 process_pending_signals (); \
1949 } while (0)
1950
1951#else /* not SYNC_INPUT */ 1939#else /* not SYNC_INPUT */
1940#define ELSE_PENDING_SIGNALS
1941#endif /* not SYNC_INPUT */
1952 1942
1953#define QUIT \ 1943#define QUIT \
1954 do { \ 1944 do { \
@@ -1960,10 +1950,9 @@ extern int pending_signals;
1960 Fthrow (Vthrow_on_input, Qt); \ 1950 Fthrow (Vthrow_on_input, Qt); \
1961 Fsignal (Qquit, Qnil); \ 1951 Fsignal (Qquit, Qnil); \
1962 } \ 1952 } \
1953 ELSE_PENDING_SIGNALS \
1963 } while (0) 1954 } while (0)
1964 1955
1965#endif /* not SYNC_INPUT */
1966
1967 1956
1968/* Nonzero if ought to quit now. */ 1957/* Nonzero if ought to quit now. */
1969 1958