diff options
| author | Glenn Morris | 2012-02-05 16:48:02 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-02-05 16:48:02 -0800 |
| commit | 866c1d22181fda6b0df3e9bf2c5f0bab9ee4a393 (patch) | |
| tree | f23ac6f559938bf73b06a9199b553a7be2902b8a | |
| parent | 62106554e2e6aea790307c9f348246434928f4d5 (diff) | |
| download | emacs-866c1d22181fda6b0df3e9bf2c5f0bab9ee4a393.tar.gz emacs-866c1d22181fda6b0df3e9bf2c5f0bab9ee4a393.zip | |
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.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/control.texi | 19 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
3 files changed, 24 insertions, 4 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 85dc017d7f5..933fe82f1e8 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-06 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * control.texi (Handling Errors): | ||
| 4 | Mention condition-case-no-debug and with-demoted-errors. | ||
| 5 | |||
| 1 | 2012-02-05 Chong Yidong <cyd@gnu.org> | 6 | 2012-02-05 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * customize.texi (Common Keywords): Minor clarifications. | 8 | * customize.texi (Common Keywords): Minor clarifications. |
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 0511f21007d..3673f753a0a 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -891,9 +891,8 @@ establishing an error handler, with the special form | |||
| 891 | 891 | ||
| 892 | @noindent | 892 | @noindent |
| 893 | This deletes the file named @var{filename}, catching any error and | 893 | This deletes the file named @var{filename}, catching any error and |
| 894 | returning @code{nil} if an error occurs@footnote{ | 894 | returning @code{nil} if an error occurs. (You can use the macro |
| 895 | Actually, you should use @code{ignore-errors} in such a simple case; | 895 | @code{ignore-errors} for a simple case like this; see below.) |
| 896 | see below.}. | ||
| 897 | 896 | ||
| 898 | The @code{condition-case} construct is often used to trap errors that | 897 | The @code{condition-case} construct is often used to trap errors that |
| 899 | are predictable, such as failure to open a file in a call to | 898 | are predictable, such as failure to open a file in a call to |
| @@ -949,6 +948,13 @@ The effect of @code{debug} here is only to prevent | |||
| 949 | given error will invoke the debugger only if @code{debug-on-error} and | 948 | given error will invoke the debugger only if @code{debug-on-error} and |
| 950 | the other usual filtering mechanisms say it should. @xref{Error Debugging}. | 949 | the other usual filtering mechanisms say it should. @xref{Error Debugging}. |
| 951 | 950 | ||
| 951 | @defmac condition-case-no-debug var protected-form handlers@dots{} | ||
| 952 | The macro @code{condition-case-no-debug} provides another way to | ||
| 953 | handle debugging of such forms. It behaves exactly like | ||
| 954 | @code{condition-case}, unless the variable @code{debug-on-error} is | ||
| 955 | non-@code{nil}, in which case it does not handle any errors at all. | ||
| 956 | @end defmac | ||
| 957 | |||
| 952 | Once Emacs decides that a certain handler handles the error, it | 958 | Once Emacs decides that a certain handler handles the error, it |
| 953 | returns control to that handler. To do so, Emacs unbinds all variable | 959 | returns control to that handler. To do so, Emacs unbinds all variable |
| 954 | bindings made by binding constructs that are being exited, and | 960 | bindings made by binding constructs that are being exited, and |
| @@ -1122,6 +1128,13 @@ Here's the example at the beginning of this subsection rewritten using | |||
| 1122 | @end smallexample | 1128 | @end smallexample |
| 1123 | @end defmac | 1129 | @end defmac |
| 1124 | 1130 | ||
| 1131 | @defmac with-demoted-errors body@dots{} | ||
| 1132 | This macro is like a milder version of @code{ignore-errors}. Rather | ||
| 1133 | than suppressing errors altogether, it converts them into messages. | ||
| 1134 | Use this form around code that is not expected to signal errors, | ||
| 1135 | but should be robust if one does occur. Note that this macro | ||
| 1136 | uses @code{condition-case-no-debug} rather than @code{condition-case}. | ||
| 1137 | @end defmac | ||
| 1125 | 1138 | ||
| 1126 | @node Error Symbols | 1139 | @node Error Symbols |
| 1127 | @subsubsection Error Symbols and Condition Names | 1140 | @subsubsection Error Symbols and Condition Names |
| @@ -1244,7 +1244,9 @@ set of "wrapping" filters, similar to around advice. | |||
| 1244 | (A version of this macro was actually added in Emacs 23.2 but was not | 1244 | (A version of this macro was actually added in Emacs 23.2 but was not |
| 1245 | advertised at the time.) | 1245 | advertised at the time.) |
| 1246 | 1246 | ||
| 1247 | ** Macro `with-demoted-errors' was added in Emacs 23.1 but not advertised. | 1247 | +++ |
| 1248 | ** The macros `condition-case-no-debug' and `with-demoted-errors' were | ||
| 1249 | added in Emacs 23.1, but not advertised. | ||
| 1248 | 1250 | ||
| 1249 | +++ | 1251 | +++ |
| 1250 | ** The new function `server-eval-at' allows evaluation of Lisp forms on | 1252 | ** The new function `server-eval-at' allows evaluation of Lisp forms on |