From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: usr1-signal, usr2-signal, etc. Date: Thu, 14 Dec 2006 18:14:26 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <20061211.233142.146367996.mituharu@math.s.chiba-u.ac.jp> <20061212.223242.258196916.mituharu@math.s.chiba-u.ac.jp> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1166087717 27387 80.91.229.10 (14 Dec 2006 09:15:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2006 09:15:17 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 14 10:15:15 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GumgM-00055l-O8 for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2006 10:15:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GumgL-0007zs-Ew for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2006 04:15:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gumfh-0007yn-Mw for emacs-devel@gnu.org; Thu, 14 Dec 2006 04:14:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gumfe-0007wG-BH for emacs-devel@gnu.org; Thu, 14 Dec 2006 04:14:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gumfe-0007vx-0Z for emacs-devel@gnu.org; Thu, 14 Dec 2006 04:14:30 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gumfb-0008DG-PF; Thu, 14 Dec 2006 04:14:28 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 0F6DE2CC8; Thu, 14 Dec 2006 18:14:26 +0900 (JST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.91 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) 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:63710 Archived-At: >>>>> On Wed, 13 Dec 2006 11:26:53 +0100, storm@cua.dk (Kim F. Storm) said: >> I tried minimizing the first problem, but the second one still >> remains. > Thank you very much. > The changes look good, so please install them. Done. >> BTW, is it necessary for us to read these events by >> read-key-sequence? If not, it looks natural to bind them in >> special-event-map. > You have a good point there! If we bind signals in > special-event-map, we don't really have to care about them being > mixed up with the rest of the keyboard events ... Yes. The Emacs Lisp info says: `signal usr1' `signal usr2' These event sequences are generated when the Emacs process receives the signals `SIGUSR1' and `SIGUSR2'. They contain no additional data because signals do not carry additional information. If one of these events arrives in the middle of a key sequence--that is, after a prefix key--then Emacs reorders the events so that this event comes either before or after the multi-event key sequence, not within it. But currently they do not behave as above. > OTOH, if we put them in the special-event-map, we make it > practically impossible for a (global) minor-mode to setup catching a > signal through its "private" keymaps. So keeping signals in the > read-key-sequence loop is definitely more flexible. > Also, although the definition of special-event-map doesn't > explicitly say so, it only allows bindings for single events. This > means that we would have to revert to having just a single event for > signals. One possible way would be to generate an intermediate single event that carries a signal number, and bind such an event to a dispatcher command in special-event-map. Then the dispatcher looks up the corresponding (multiple) key sequence and executes the associated command. `mac-dispatch-apple-event' in term/mac-win.el handles Apple Events in such a way so these events may not be mixed up with a usual key sequence. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp