about summary refs log tree commit diff stats
path: root/lisp/acdw.el
diff options
context:
space:
mode:
authorCase Duckworth2021-04-21 17:54:29 -0500
committerCase Duckworth2021-04-21 17:54:29 -0500
commit152daf82ef2bdfe8d7a863d4d87fec02cb5a7465 (patch)
treed86826d3f9e031962efbe0eb402c2d8ab71c11bb /lisp/acdw.el
parentSetup emoji fonts! (diff)
downloademacs-152daf82ef2bdfe8d7a863d4d87fec02cb5a7465.tar.gz
emacs-152daf82ef2bdfe8d7a863d4d87fec02cb5a7465.zip
Add macro `with-message'
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r--lisp/acdw.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 483bf60..1a699bb 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -70,6 +70,15 @@ each hook in HOOKS."
70 file 70 file
71 nil))) 71 nil)))
72 72
73(defmacro with-message (message &rest body)
74 "Execute BODY, messaging 'MESSAGE...' before and 'MESSAGE... Done.' after."
75 (declare (indent 1))
76 ;; Wrap a progn inside a prog1 to return the return value of the body.
77 `(prog1
78 (progn (message "%s..." ,message)
79 ,@body)
80 (message "%s... Done." ,message)))
81
73(defun acdw/dir (&optional file make-directory) 82(defun acdw/dir (&optional file make-directory)
74 "Place Emacs files in one place. 83 "Place Emacs files in one place.
75 84