From: Stefan Monnier <monnier@iro.umontreal.ca>
To: ARISAWA Akihiro <ari@mbf.ocn.ne.jp>
Cc: 5680@debbugs.gnu.org
Subject: bug#5680: 23.1; canot quit infloop by C-g
Date: Fri, 05 Mar 2010 18:10:57 -0500 [thread overview]
Message-ID: <jwvlje6z7yq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874okwp09v.fsf@nagi.lyrical.homelinux.net> (ARISAWA Akihiro's message of "Fri, 05 Mar 2010 00:35:56 +0900")
>>>>> "ARISAWA" == ARISAWA Akihiro <ari@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. */
next prev parent reply other threads:[~2010-03-05 23:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 15:35 bug#5680: 23.1; canot quit infloop by C-g ARISAWA Akihiro
2010-03-05 23:10 ` Stefan Monnier [this message]
2010-03-06 1:19 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvlje6z7yq.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=5680@debbugs.gnu.org \
--cc=ari@mbf.ocn.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.