]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/control.texi
* doc/lispref/tips.texi: Don't bind a key sequence ending in C-g.
[gnu-emacs] / doc / lispref / control.texi
index 2b4aabaff83820a59a52f6677ba4df80e2f38420..875c23658b9a4f6b0ff2378b293e9b70ec3e1268 100644 (file)
@@ -1,7 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002,
-@c   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2011  Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/control
 @node Control Structures, Variables, Evaluation, Top
@@ -624,7 +623,7 @@ error is signaled with data @code{(@var{tag} @var{value})}.
 @subsection Examples of @code{catch} and @code{throw}
 
   One way to use @code{catch} and @code{throw} is to exit from a doubly
-nested loop.  (In most languages, this would be done with a ``go to.'')
+nested loop.  (In most languages, this would be done with a ``goto.'')
 Here we compute @code{(foo @var{i} @var{j})} for @var{i} and @var{j}
 varying from 0 to 9:
 
@@ -1023,9 +1022,23 @@ error description.
 
 If @var{var} is @code{nil}, that means no variable is bound.  Then the
 error symbol and associated data are not available to the handler.
+
+@cindex rethrow a signal
+Sometimes it is necessary to re-throw a signal caught by
+@code{condition-case}, for some outer-level handler to catch.  Here's
+how to do that:
+
+@smallexample
+  (signal (car err) (cdr err))
+@end smallexample
+
+@noindent
+where @code{err} is the error description variable, the first argument
+to @code{condition-case} whose error condition you want to re-throw.
+@xref{Definition of signal}.
 @end defspec
 
-@defun error-message-string error-description
+@defun error-message-string error-descriptor
 This function returns the error message string for a given error
 descriptor.  It is useful if you want to handle an error by printing the
 usual error message for that error.  @xref{Definition of signal}.
@@ -1109,6 +1122,7 @@ Here's the example at the beginning of this subsection rewritten using
 @end smallexample
 @end defmac
 
+
 @node Error Symbols
 @subsubsection Error Symbols and Condition Names
 @cindex error symbol
@@ -1304,7 +1318,3 @@ quit, and the quit happens immediately after the function
 @code{ftp-setup-buffer} returns but before the variable @code{process} is
 set, the process will not be killed.  There is no easy way to fix this bug,
 but at least it is very unlikely.
-
-@ignore
-   arch-tag: 8abc30d4-4d3a-47f9-b908-e9e971c18c6d
-@end ignore