summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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