From b7295426c95bf968288bb6ead2db416a71ec4d3e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 9 Jan 2022 20:52:07 -0600 Subject: Weekend, babee --- lisp/acdw.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lisp/acdw.el') diff --git a/lisp/acdw.el b/lisp/acdw.el index 262c15e..603f46f 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -128,10 +128,12 @@ I keep forgetting how they differ." (defmacro +with-message (message &rest body) "Execute BODY, with MESSAGE. If body executes without errors, MESSAGE...Done will be displayed." - ;; ^ TODO - `(prog1 (progn (message ,(concat message "...")) - ,@body) - (message ,(concat message "...Done.")))) + (declare (indent 1)) + (let ((msg (gensym))) + `(let ((,msg ,message)) + (unwind-protect (progn (message "%s..." ,msg) + ,@body) + (message "%s... Done." ,msg))))) (defun +mapc-some-buffers (func &optional predicate) "Perform FUNC on all buffers satisfied by PREDICATE. -- cgit 1.4.1-21-gabe81