diff options
| -rw-r--r-- | lisp/subr.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index ae7c70d6781..8264055651a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -202,6 +202,11 @@ the return value (nil if RESULT is omitted). | |||
| 202 | Treated as a declaration when used at the right place in a | 202 | Treated as a declaration when used at the right place in a |
| 203 | `defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)" | 203 | `defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)" |
| 204 | nil) | 204 | nil) |
| 205 | |||
| 206 | (defmacro ignore-errors (&rest body) | ||
| 207 | "Execute BODY; if an error occurs, return nil. | ||
| 208 | Otherwise, return result of last form in BODY." | ||
| 209 | `(condition-case nil (progn ,@body) (error nil))) | ||
| 205 | 210 | ||
| 206 | ;;;; Basic Lisp functions. | 211 | ;;;; Basic Lisp functions. |
| 207 | 212 | ||