From 9c1cac7e5e48ce103acf02b1d5bd1f406a63e39f Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 25 Mar 2023 12:00:43 +0000 Subject: [PATCH] el/dot-emacs.el: Wrap `trap' defintiion in `eval-and-compile'. Otherwise it's not available at top-level in older Emacsen, for some reason. --- el/dot-emacs.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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. -- 2.11.0