# HG changeset patch # User Kim F. Storm # Date 1165235420 0 # Node ID b3bb05fc3e6aeb83a144d18a2fbeedfa13f59dad # Parent 4c44b86a628e934286c9e3e8bc9718f73d75341d (Misc Events): Update signal events. (Event Examples): Add signal example. diff -r 4c44b86a628e -r b3bb05fc3e6a lispref/commands.texi --- a/lispref/commands.texi Mon Dec 04 12:27:09 2006 +0000 +++ b/lispref/commands.texi Mon Dec 04 12:30:20 2006 +0000 @@ -1586,13 +1586,14 @@ parameters are used to display the help-echo text are described in @ref{Text help-echo}. -@cindex @code{usr1-signal} event -@cindex @code{usr2-signal} event -@item usr1-signal -@itemx usr2-signal -These events are generated when the Emacs process receives the signals -@code{SIGUSR1} and @code{SIGUSR2}. They contain no additional data -because signals do not carry additional information. +@cindex @code{signal usr1} event +@cindex @code{signal usr2} event +@cindex user signals +@item signal usr1 +@itemx signal usr2 +These event sequences are generated when the Emacs process receives +the signals @code{SIGUSR1} and @code{SIGUSR2}. They contain no +additional data because signals do not carry additional information. @end table If one of these events arrives in the middle of a key sequence---that @@ -1632,6 +1633,16 @@ -453816)) @end smallexample +To handle a SIGUSR1 signal, define an interactive function, and +bind it to the @code{signal usr1} event sequence: + +@smallexample +(defun usr1-handler () + (interactive) + (message "Got USR1 signal")) +(global-set-key [signal usr1] 'usr1-handler) +@end smallexample + @node Classifying Events @subsection Classifying Events @cindex event type