Add compile-on-save
This commit is contained in:
parent
99c6985782
commit
38b76b4527
@ -207,6 +207,23 @@
|
||||
|
||||
(setq initial-buffer-choice 'xah-new-empty-buffer)
|
||||
|
||||
(defun compile-on-save-start ()
|
||||
(let ((buffer (compilation-find-buffer)))
|
||||
(unless (get-buffer-process buffer)
|
||||
(recompile))))
|
||||
|
||||
(define-minor-mode compile-on-save-mode
|
||||
"Minor mode to automatically call `recompile' whenever the
|
||||
current buffer is saved. When there is ongoing compilation,
|
||||
nothing happens."
|
||||
:lighter " CoS"
|
||||
(if compile-on-save-mode
|
||||
(progn (make-local-variable 'after-save-hook)
|
||||
(add-hook 'after-save-hook 'compile-on-save-start nil t))
|
||||
(kill-local-variable 'after-save-hook)))
|
||||
|
||||
|
||||
|
||||
(require 'base16-theme)
|
||||
|
||||
(defvar base16-generated-colors
|
||||
|
Loading…
Reference in New Issue
Block a user