diff options
author | Case Duckworth | 2021-04-21 17:54:29 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-21 17:54:29 -0500 |
commit | 152daf82ef2bdfe8d7a863d4d87fec02cb5a7465 (patch) | |
tree | d86826d3f9e031962efbe0eb402c2d8ab71c11bb /lisp | |
parent | Setup emoji fonts! (diff) | |
download | emacs-152daf82ef2bdfe8d7a863d4d87fec02cb5a7465.tar.gz emacs-152daf82ef2bdfe8d7a863d4d87fec02cb5a7465.zip |
Add macro `with-message'
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 9 |
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 | ||