From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grischka Newsgroups: gmane.emacs.devel Subject: Re: Bikeshedding go! Why is unbound? Date: Tue, 18 Jan 2011 13:10:39 +0100 Message-ID: <4D35833F.4060208@gmx.de> References: <4D3430B2.20604@gmx.de> <87vd1m7w1u.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1295352671 17675 80.91.229.12 (18 Jan 2011 12:11:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2011 12:11:11 +0000 (UTC) Cc: lennart.borgman@gmail.com, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 18 13:11:04 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 1PfAOt-0004Kb-Pc for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2011 13:11:03 +0100 Original-Received: from localhost ([127.0.0.1]:37180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfAOs-0002NP-IT for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2011 07:11:02 -0500 Original-Received: from [140.186.70.92] (port=37345 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfAOi-0002MF-T5 for emacs-devel@gnu.org; Tue, 18 Jan 2011 07:10:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfAOh-0006Sa-FB for emacs-devel@gnu.org; Tue, 18 Jan 2011 07:10:52 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:39405) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PfAOh-0006S4-06 for emacs-devel@gnu.org; Tue, 18 Jan 2011 07:10:51 -0500 Original-Received: (qmail invoked by alias); 18 Jan 2011 12:10:47 -0000 Original-Received: from unknown (EHLO [10.74.175.106]) [82.113.106.197] by mail.gmx.net (mp038) with SMTP; 18 Jan 2011 13:10:47 +0100 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX1/t1yJbEh3tI1ePn1/7ylpgcH3EDsqF4zJl1mhX7c nCpZ9W6496SCJ5 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <87vd1m7w1u.fsf@uwakimon.sk.tsukuba.ac.jp> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:134698 Archived-At: Stephen J. Turnbull wrote: > > Unlike XEmacs, GNU Emacs is still a console application at its heart. > > It wants to "read" events in a loop from an input stream until it > > finds them complete as a "key-sequence". No function seems to exist > > that could deal with events that are already read. > > Surely (GNU) Emacs has a way (in Lisp, even) to "unread" a keystroke? > This kind of lookahead is the most convenient way to think about input > methods, for example. Actually I was mistaken: XEmacs too appears to use a private queue and a read function ("next-event"). However as opposed to GNU Emacs, XEmacs has 'dispatch_event' which might do what I was looking for: Handle an event synchronously and possibly return a result. Maybe like: success = dispatch_event(key_event); Of course 'key_event' might still be different from 'key_stroke'. Btw. one can see in XEmacs pretty obviously how the Windows GUI is run in the same thread by the benefits of that 'dispatch_event' function. --- grischka