1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

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

This commit is contained in:
Glenn Morris 2008-05-07 02:57:53 +00:00
parent 5a1dde61e2
commit 6b5de13685

View file

@ -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'.)"
nil)
(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.