[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: usr1-signal, usr2-signal, etc.

From: Kim F. Storm
Subject: Re: usr1-signal, usr2-signal, etc.
Date: Thu, 14 Dec 2006 12:23:45 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

YAMAMOTO Mitsuharu <address@hidden> 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 <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]