aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-07-05 13:31:53 -0300
committerEuAndreh <eu@euandre.org>2018-07-05 13:31:53 -0300
commita59d5bf6b7465fd326ed8b3a697bdc74a263515c (patch)
tree5d1fdf4a675b3a91eb617ebcf90c65e6f2b9657c
parentSymlink private emacs package (diff)
downloaddotfiles-a59d5bf6b7465fd326ed8b3a697bdc74a263515c.tar.gz
dotfiles-a59d5bf6b7465fd326ed8b3a697bdc74a263515c.tar.xz
Add #'recompile-el-files function
-rw-r--r--spacemacs.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/spacemacs.el b/spacemacs.el
index 9db0854..d19a92c 100644
--- a/spacemacs.el
+++ b/spacemacs.el
@@ -522,6 +522,9 @@ in the dump."
("M-SPC" . (lambda () (interactive) (just-one-space -1)))
("M-[" . (lambda () (interactive) (find-file "~/tmp/scratch.org")))))
+(defvar custom-el-files '("~/annex/dev/code/dotfiles/emacs/re-jump.el"
+ "~/quicklisp/slime-helper.el"))
+
(defmacro measure-time (&rest body)
"Measure and return the running time of the code block."
(declare (indent defun))
@@ -530,6 +533,11 @@ in the dump."
,@body
(- (float-time) ,start))))
+(defun recompile-el-files ()
+ (dolist (path custom-el-files)
+ (when (file-exists-p path)
+ (byte-compile-file path t))))
+
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after layers configuration.
@@ -563,8 +571,7 @@ This is the place where most of your configurations should be done. Unless it is
(dolist (mode-pair '(("\\.json\\.base$" . json-mode)))
(setq auto-mode-alist (cons mode-pair auto-mode-alist)))
- (dolist (path '("~/annex/dev/code/dotfiles/emacs/re-jump.el"
- "~/quicklisp/slime-helper.el"))
+ (dolist (path custom-el-files)
(when (file-exists-p path)
(load path)))