From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Recent keyboard changes breaks quitting Date: Sun, 23 Sep 2012 16:33:33 +0800 Message-ID: <87fw692l5u.fsf@gnu.org> References: <87lig22jrr.fsf@gnu.org> <837grmkpfa.fsf@gnu.org> <87lig2vusz.fsf@gnu.org> <87wqzm9d0c.fsf@gnu.org> <833929lwds.fsf@gnu.org> <87haqp5u1a.fsf@gnu.org> <83mx0hjsl5.fsf@gnu.org> <87sja91dfv.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1348389226 25480 80.91.229.3 (23 Sep 2012 08:33:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2012 08:33:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 23 10:33:51 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TFhdM-0007Kx-5D for ged-emacs-devel@m.gmane.org; Sun, 23 Sep 2012 10:33:48 +0200 Original-Received: from localhost ([::1]:59355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFhdH-0005wI-Ao for ged-emacs-devel@m.gmane.org; Sun, 23 Sep 2012 04:33:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFhdE-0005w5-Tl for emacs-devel@gnu.org; Sun, 23 Sep 2012 04:33:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFhdE-0006Av-03 for emacs-devel@gnu.org; Sun, 23 Sep 2012 04:33:40 -0400 Original-Received: from mail-pa0-f41.google.com ([209.85.220.41]:44906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFhdD-0006Ai-R9; Sun, 23 Sep 2012 04:33:39 -0400 Original-Received: by padfa10 with SMTP id fa10so222381pad.0 for ; Sun, 23 Sep 2012 01:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=WzP8POGkS8MCTFFm8c7RwVoAyk/eep+llnSIGalEyCI=; b=oHq24O6rQwusCLm4NzR5eP7hVxJzPavPYrgk3RQu7gknSdoT8ndXBbebjPQTxBzWn/ Ocx3Tz66PvLECbPUHdI5rNkWbqST/gT6DkLvIwFrCgmZlgT6FpzWZy1n9GcbDiVBkl+F EEZpkgn2/G4g/hEt2Z1RPPEQGajOSeGx8JK7a8wmHwHqHy8yL/uR2XW4JuArxhFTRtKP tz35wtcu+S0WN/8jiwCA4MM3BbzD672BGIr22G6zb+O/RIxrVzZN8NeKwYFp6U06CPep Xs483NhPPud6jA4GrTANh3Anb8gTpa2IhWwjEpwul5LOG6q3lG3oYpate530LZM3CSmc evxA== Original-Received: by 10.68.191.226 with SMTP id hb2mr27951918pbc.129.1348389218761; Sun, 23 Sep 2012 01:33:38 -0700 (PDT) Original-Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id kc9sm7812439pbb.11.2012.09.23.01.33.35 (version=SSLv3 cipher=OTHER); Sun, 23 Sep 2012 01:33:37 -0700 (PDT) In-Reply-To: <87sja91dfv.fsf@gnu.org> (Chong Yidong's message of "Sun, 23 Sep 2012 14:05:40 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153481 Archived-At: I found the problem. The Fcopy_sequence in timer_check can QUIT, jumping back to the command loop. If this happens when timer_check is from inside wait_reading_process_output, it screws up the wait_reading_process_output's handling of the quit flag. === modified file 'src/keyboard.c' *** src/keyboard.c 2012-09-22 13:16:03 +0000 --- src/keyboard.c 2012-09-23 08:22:06 +0000 *************** *** 4496,4501 **** --- 4496,4504 ---- Lisp_Object timers, idle_timers; struct gcpro gcpro1, gcpro2; + Lisp_Object tem = Vinhibit_quit; + Vinhibit_quit = Qt; + /* We use copies of the timers' lists to allow a timer to add itself again, without locking up Emacs if the newly added timer is already ripe when added. */ *************** *** 4508,4513 **** --- 4511,4518 ---- else idle_timers = Qnil; + Vinhibit_quit = tem; + GCPRO2 (timers, idle_timers); do