From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: usr1-signal, usr2-signal, etc. Date: Thu, 14 Dec 2006 12:23:45 +0100 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 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166095473 19793 80.91.229.10 (14 Dec 2006 11:24:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2006 11:24:33 +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 12:24:29 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 1GuohM-0004sQ-E1 for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2006 12:24:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuohL-0000AT-UO for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2006 06:24:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Guoh8-00008W-Hx for emacs-devel@gnu.org; Thu, 14 Dec 2006 06:24:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Guoh7-00006l-9c for emacs-devel@gnu.org; Thu, 14 Dec 2006 06:24:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Guoh7-00006R-2e for emacs-devel@gnu.org; Thu, 14 Dec 2006 06:24:09 -0500 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Guoh2-00028U-VA; Thu, 14 Dec 2006 06:24:05 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepb.post.tele.dk (Postfix) with SMTP id E3C01A50091; Thu, 14 Dec 2006 12:23:49 +0100 (CET) Original-To: YAMAMOTO Mitsuharu In-Reply-To: (YAMAMOTO Mitsuharu's message of "Thu\, 14 Dec 2006 18\:14\:26 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) 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:63716 Archived-At: YAMAMOTO Mitsuharu writes: > 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. That's no good! This is a good reason for handling signals through special-event-map. > 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. IMO, signal handling is not important enough for that complexity. So I would rather redefine them to single events (named sigusr1 and sigusr2 as those names are already known to the signal-process function), and handle them through special-event-map as you suggested. The docs you quote above should be changed to say that signals should be handled through special-event-map, or signals may risk messing up the normal event processing. -- Kim F. Storm http://www.cua.dk