summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-05-01 09:21:51 -0500
committerCase Duckworth2022-05-01 09:21:51 -0500
commit0730f1e1acefd0345cb5e0eab6dbe696397d5723 (patch)
tree5b3854fff9836dc9e90ceb89ae2db01ea7d63bf8
parentRemove (:quit)-ed setup forms (diff)
downloademacs-0730f1e1acefd0345cb5e0eab6dbe696397d5723.tar.gz
emacs-0730f1e1acefd0345cb5e0eab6dbe696397d5723.zip
Add +compile-dispatch
At some point I probably should add a +recompile .. or something, I'm not sure
how the compile flow works in Emacs.
-rw-r--r--init.el2
-rw-r--r--lisp/+compile.el19
2 files changed, 21 insertions, 0 deletions
diff --git a/init.el b/init.el index a19b517..524fdce 100644 --- a/init.el +++ b/init.el
@@ -264,6 +264,8 @@
264 (:option diary-file (private/ "diary"))) 264 (:option diary-file (private/ "diary")))
265 265
266(setup compile 266(setup compile
267 (:require +compile)
268 (:+key "<f5>" #'+compile-dispatch)
267 (:option compilation-always-kill t 269 (:option compilation-always-kill t
268 compilation-ask-about-save nil 270 compilation-ask-about-save nil
269 compilation-scroll-output t)) 271 compilation-scroll-output t))
diff --git a/lisp/+compile.el b/lisp/+compile.el new file mode 100644 index 0000000..b20ae4d --- /dev/null +++ b/lisp/+compile.el
@@ -0,0 +1,19 @@
1;;; +compile.el --- Extras for compile -*- lexical-binding: t; -*-
2
3;;; Commentary:
4
5;;; Code:
6
7(defcustom +compile-function nil
8 "Function to run to \"compile\" a buffer."
9 :type 'function
10 :local t)
11
12(defun +compile-dispatch (&optional arg)
13 "Run `+compile-function', if bound, or `compile'.
14Any prefix ARG is passed to that function."
15 (interactive "P")
16 (call-interactively (or +compile-function #'compile)))
17
18(provide '+compile)
19;;; +compile.el ends here