GNU bug report logs -
#5680
23.1; canot quit infloop by C-g
Previous Next
Reported by: ARISAWA Akihiro <ari <at> mbf.ocn.ne.jp>
Date: Thu, 4 Mar 2010 16:44:01 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> "ARISAWA" == ARISAWA Akihiro <ari <at> mbf.ocn.ne.jp> writes:
> Hi developers,
> When I evaluate following code and type C-g, I cannot quit a infinity loop.
> (funcall (byte-compile (lambda () (while t))))
> In Emacs-22, I can quit it.
Indeed, thanks. I've just installed the patch below which should fix
this problem.
Stefan
=== modified file 'src/bytecode.c'
--- src/bytecode.c 2010-01-13 08:35:10 +0000
+++ src/bytecode.c 2010-03-05 23:01:01 +0000
@@ -393,6 +393,7 @@
Fsignal (Qquit, Qnil); \
AFTER_POTENTIAL_GC (); \
} \
+ ELSE_PENDING_SIGNALS \
} while (0)
=== modified file 'src/lisp.h'
--- src/lisp.h 2010-01-22 09:10:04 +0000
+++ src/lisp.h 2010-03-05 23:03:16 +0000
@@ -1933,22 +1933,12 @@
#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); \
- } \
+#define ELSE_PENDING_SIGNALS \
else if (pending_signals) \
- process_pending_signals (); \
- } while (0)
-
+ process_pending_signals ();
#else /* not SYNC_INPUT */
+#define ELSE_PENDING_SIGNALS
+#endif /* not SYNC_INPUT */
#define QUIT \
do { \
@@ -1960,10 +1950,9 @@
Fthrow (Vthrow_on_input, Qt); \
Fsignal (Qquit, Qnil); \
} \
+ ELSE_PENDING_SIGNALS \
} while (0)
-#endif /* not SYNC_INPUT */
-
/* Nonzero if ought to quit now. */
This bug report was last modified 15 years and 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.