Commit 6b5de136 authored by Glenn Morris's avatar Glenn Morris
Browse files

(ignore-errors): Move here from cl-macs.el.

parent 5a1dde61
......@@ -202,6 +202,11 @@ the return value (nil if RESULT is omitted).
Treated as a declaration when used at the right place in a
`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)"
(defmacro ignore-errors (&rest body)
"Execute BODY; if an error occurs, return nil.
Otherwise, return result of last form in BODY."
`(condition-case nil (progn ,@body) (error nil)))
;;;; Basic Lisp functions.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment