[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107126: Document yet more things tha
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107126: Document yet more things that were never added to NEWS |
Date: |
Sun, 05 Feb 2012 16:48:02 -0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107126
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2012-02-05 16:48:02 -0800
message:
Document yet more things that were never added to NEWS
* doc/lispref/control.texi (Handling Errors):
Mention condition-case-no-debug and with-demoted-errors.
* etc/NEWS: Related edits.
modified:
doc/lispref/ChangeLog
doc/lispref/control.texi
etc/NEWS
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2012-02-05 14:27:06 +0000
+++ b/doc/lispref/ChangeLog 2012-02-06 00:48:02 +0000
@@ -1,3 +1,8 @@
+2012-02-06 Glenn Morris <address@hidden>
+
+ * control.texi (Handling Errors):
+ Mention condition-case-no-debug and with-demoted-errors.
+
2012-02-05 Chong Yidong <address@hidden>
* customize.texi (Common Keywords): Minor clarifications.
=== modified file 'doc/lispref/control.texi'
--- a/doc/lispref/control.texi 2012-01-23 04:23:50 +0000
+++ b/doc/lispref/control.texi 2012-02-06 00:48:02 +0000
@@ -891,9 +891,8 @@
@noindent
This deletes the file named @var{filename}, catching any error and
-returning @code{nil} if an error address@hidden
-Actually, you should use @code{ignore-errors} in such a simple case;
-see below.}.
+returning @code{nil} if an error occurs. (You can use the macro
address@hidden for a simple case like this; 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
@@ -949,6 +948,13 @@
given error will invoke the debugger only if @code{debug-on-error} and
the other usual filtering mechanisms say it should. @xref{Error Debugging}.
address@hidden condition-case-no-debug var protected-form address@hidden
+The macro @code{condition-case-no-debug} provides another way to
+handle debugging of such forms. It behaves exactly like
address@hidden, unless the variable @code{debug-on-error} is
address@hidden, in which case it does not handle any errors at all.
address@hidden defmac
+
Once Emacs decides that a certain handler handles the error, it
returns control to that handler. To do so, Emacs unbinds all variable
bindings made by binding constructs that are being exited, and
@@ -1122,6 +1128,13 @@
@end smallexample
@end defmac
address@hidden with-demoted-errors address@hidden
+This macro is like a milder version of @code{ignore-errors}. Rather
+than suppressing errors altogether, it converts them into messages.
+Use this form around code that is not expected to signal errors,
+but should be robust if one does occur. Note that this macro
+uses @code{condition-case-no-debug} rather than @code{condition-case}.
address@hidden defmac
@node Error Symbols
@subsubsection Error Symbols and Condition Names
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-02-05 03:31:57 +0000
+++ b/etc/NEWS 2012-02-06 00:48:02 +0000
@@ -1244,7 +1244,9 @@
(A version of this macro was actually added in Emacs 23.2 but was not
advertised at the time.)
-** Macro `with-demoted-errors' was added in Emacs 23.1 but not advertised.
++++
+** The macros `condition-case-no-debug' and `with-demoted-errors' were
+added in Emacs 23.1, but not advertised.
+++
** The new function `server-eval-at' allows evaluation of Lisp forms on
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107126: Document yet more things that were never added to NEWS,
Glenn Morris <=