]> code.delx.au - gnu-emacs/blobdiff - lispref/commands.texi
(List Motion): Punctuation fix.
[gnu-emacs] / lispref / commands.texi
index 16b825d3de37d59b1568d5bed2c88e6206cca933..7188961e344245a17464683fabd578c1ce343647 100644 (file)
@@ -1586,13 +1586,14 @@ The precise meaning of the event parameters and the way these
 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 @@ into another window.  That produces a pair of events like these:
                    -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
@@ -2503,6 +2514,13 @@ put them in @code{unread-command-events} is to use
 
 Normally you add events to the front of this list, so that the events
 most recently unread will be reread first.
+
+Events read from this list are not normally added to the current
+command's key sequence (as returned by e.g. @code{this-command-keys}),
+as the events will already have been added once as they were read for
+the first time.  An element of the form @code{(@code{t} . @var{event})}
+forces @var{event} to be added to the current command's key sequence.
+
 @end defvar
 
 @defun listify-key-sequence key