emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/doc/lispref/control.texi,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/doc/lispref/control.texi,v
Date: Wed, 15 Oct 2008 12:48:29 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/10/15 12:48:29

Index: control.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/control.texi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- control.texi        8 Jan 2008 20:45:47 -0000       1.3
+++ control.texi        15 Oct 2008 12:48:29 -0000      1.4
@@ -891,7 +891,9 @@
 
 @noindent
 This deletes the file named @var{filename}, catching any error and
-returning @code{nil} if an error occurs.
+returning @code{nil} if an error address@hidden
+Actually, you should use @code{ignore-errors} in such a simple case;
+see below.}.
 
   The @code{condition-case} construct is often used to trap errors that
 are predictable, such as failure to open a file in a call to
@@ -1089,6 +1091,23 @@
 @end group
 @end smallexample
 
address@hidden ignore-errors address@hidden
+This construct executes @var{body}, ignoring any errors that occur
+during its execution.  If the execution is without error,
address@hidden returns the value of the last form in @var{body};
+otherwise, it returns @code{nil}.
+
+Here's the example at the beginning of this subsection rewritten using
address@hidden:
+
address@hidden
address@hidden
+  (ignore-errors
+   (delete-file filename))
address@hidden group
address@hidden smallexample
address@hidden defmac
+
 @node Error Symbols
 @subsubsection Error Symbols and Condition Names
 @cindex error symbol




reply via email to

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