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.
This commit is contained in:
parent
5c02bbc592
commit
0730f1e1ac
2
init.el
2
init.el
|
@ -264,6 +264,8 @@
|
|||
(:option diary-file (private/ "diary")))
|
||||
|
||||
(setup compile
|
||||
(:require +compile)
|
||||
(:+key "<f5>" #'+compile-dispatch)
|
||||
(:option compilation-always-kill t
|
||||
compilation-ask-about-save nil
|
||||
compilation-scroll-output t))
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
;;; +compile.el --- Extras for compile -*- lexical-binding: t; -*-
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defcustom +compile-function nil
|
||||
"Function to run to \"compile\" a buffer."
|
||||
:type 'function
|
||||
:local t)
|
||||
|
||||
(defun +compile-dispatch (&optional arg)
|
||||
"Run `+compile-function', if bound, or `compile'.
|
||||
Any prefix ARG is passed to that function."
|
||||
(interactive "P")
|
||||
(call-interactively (or +compile-function #'compile)))
|
||||
|
||||
(provide '+compile)
|
||||
;;; +compile.el ends here
|
Loading…
Reference in New Issue