From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Bikeshedding go! Why is unbound? Date: Tue, 18 Jan 2011 14:33:35 +0100 Message-ID: References: <4D355F3A.4040709@gmx.de> <871v4abc80.fsf@wanadoo.es> <4D359279.4090804@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295357654 10887 80.91.229.12 (18 Jan 2011 13:34:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2011 13:34:14 +0000 (UTC) Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , emacs-devel@gnu.org To: grischka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 18 14:34:10 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PfBhJ-000819-5s for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2011 14:34:09 +0100 Original-Received: from localhost ([127.0.0.1]:42529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfBhI-0005V1-9S for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2011 08:34:08 -0500 Original-Received: from [140.186.70.92] (port=55000 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfBh8-0005Te-1B for emacs-devel@gnu.org; Tue, 18 Jan 2011 08:33:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfBh6-0004Zu-Ff for emacs-devel@gnu.org; Tue, 18 Jan 2011 08:33:57 -0500 Original-Received: from mail-ew0-f41.google.com ([209.85.215.41]:51252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfBh6-0004Zj-AA for emacs-devel@gnu.org; Tue, 18 Jan 2011 08:33:56 -0500 Original-Received: by ewy27 with SMTP id 27so3018213ewy.0 for ; Tue, 18 Jan 2011 05:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=LhnEYve/gw6vLTUHv0b0AcNBOJ/674CkToUYcAvvy4I=; b=oznrhjTV7s2wtjJ7Hj8qbLDsb9pARpgJ4aUc7A5fTXoGHjakqyUVZDM+how6xm+UT6 4F1GSwixK4tuE4HF20Z9RY+BOsMFW4JeWCQT2a2bdCUoTTygL4/s3c8WS1PCWVq/tDBb c+Y6sUpea2vfmpesGp1QmDonLR9FgyiPagCCs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=x3M6iRpF0Frxw5ch04e7MsmuZrKSZkD3rfCaMJ9YpIPgpQCmOuKW71sNvAAPB8Uvcj Ikh3fZTP4MlsDlbAD1fi+IC8UbaZb46+8JDLHEfOfdcj9yMUUfts/wL9FvxeWvVVnETf 9FxcYvaYFjR4/bR6ebIkHNZ6TdxxD8j8amL4w= Original-Received: by 10.213.28.12 with SMTP id k12mr5513653ebc.84.1295357635581; Tue, 18 Jan 2011 05:33:55 -0800 (PST) Original-Received: by 10.213.20.148 with HTTP; Tue, 18 Jan 2011 05:33:35 -0800 (PST) In-Reply-To: <4D359279.4090804@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134702 Archived-At: On Tue, Jan 18, 2011 at 2:15 PM, grischka wrote: > =C3=93scar Fuentes wrote: >>> >>> Well, it would be difficult to determine on the Windows level whether >>> the single keystroke was maybe part of C-x M-f4 or C-h M-f4. =C2=A0So i= n >>> any case it is better to reuse emacs central event parser. >> >> This is unnecesary too. Alt-F4 must work irrespectively of the prefix >> keys typed so far: if you type C-x or C-h and then click on the Close >> button on the top right of the frame, Emacs thinks you want to exit the >> application. Alt-F4 must have the same effect as clicking that button >> (when M-f4 is unbound on Emacs, hence the need for checking the binding >> from the Windows event loop). > > A matter of taste. And structure. The structure used for handling key sequences is not very compatible with breaking them at any point. Neither is the semantic structure for this. >>> =C2=A0 =C2=A0(global-set-key [M-f4] 'w32-syskey) Please don't forget that it is Alt+F4 we have been discussing, not M-f4. When it comes to implementation, if you want to try to just requeue the WM_... messages then a possible implementation could be something like: - Save all keyboard WM_... events in a stack. - Clear this stack by sending a w32 message from the lisp thread when a key sequence is used. - When a key sequence instead is unbound then requeue the messages from this stack and clear the stack. Though as I said I am a bit doubtful that this simple scheme will work (it might upset windows keyboard state) it is not very much work to test it. If it does not work then look at the SendKeys API.