makefile: reload running Emacs after tasks + refactor

This commit is contained in:
Henrik Lissner 2017-02-06 00:12:44 -05:00
parent 9a126a1274
commit f1208e9179
4 changed files with 64 additions and 49 deletions

View file

@ -6,6 +6,7 @@
(require 'dash)
(require 'f)
(require 's)
(eval-when-compile (require 'cl-lib))
(package! anaphora
:commands (awhen aif acond awhile))
@ -44,6 +45,13 @@ during compilation."
'with-no-warnings)
(with-eval-after-load ',feature ,@forms)))
(defmacro quiet! (&rest forms)
"Run FORMS without making any noise (no messages)."
`(cl-letf (((symbol-function 'load-file) (lambda (file) (load file nil t)))
((symbol-function 'message) (lambda (&rest _)))
(inhibit-message t))
,@forms))
(defmacro add-hook! (hook &rest func-or-forms)
"A convenience macro for `add-hook'.