X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/2ab49ba70c353b394c39c694e6f1e0df9a42c858..9c1cac7e5e48ce103acf02b1d5bd1f406a63e39f:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index fc219b2..3bed078 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -87,15 +87,16 @@ This may be at the expense of cool features.") ;; If individual bits of this file go tits-up, we don't particularly want ;; the whole lot to stop right there and then, because it's bloody annoying. -(defmacro trap (&rest forms) - "Execute FORMS without allowing errors to propagate outside." - (declare (indent 0) - (debug t)) - `(condition-case err - ,(if (cdr forms) (cons 'progn forms) (car forms)) - (error (message "Error (trapped): %s in %s" - (error-message-string err) - ',forms)))) +(eval-and-compile + (defmacro trap (&rest forms) + "Execute FORMS without allowing errors to propagate outside." + (declare (indent 0) + (debug t)) + `(condition-case err + ,(if (cdr forms) (cons 'progn forms) (car forms)) + (error (message "Error (trapped): %s in %s" + (error-message-string err) + ',forms))))) ;; Configuration reading.