Compile files to elc
This commit is contained in:
parent
4e3bdc6352
commit
bf729d6ea3
5 changed files with 23 additions and 8 deletions
17
functions.el
17
functions.el
|
|
@ -24,4 +24,21 @@
|
|||
(set-face-attribute 'helm-header nil :font
|
||||
(format "Hasklig %d"
|
||||
(+ size 2))))
|
||||
|
||||
;;;; Functions related to compilation of files
|
||||
(defun byte-compile-init-dir ()
|
||||
"Byte-compile all your dotfiles."
|
||||
(interactive)
|
||||
(byte-recompile-directory user-emacs-directory 0))
|
||||
|
||||
(defun remove-elc-on-save ()
|
||||
"If you're saving an elisp file, likely the .elc is no longer valid."
|
||||
(add-hook 'after-save-hook
|
||||
(lambda ()
|
||||
(if (file-exists-p (concat buffer-file-name "c"))
|
||||
(delete-file (concat buffer-file-name "c"))))
|
||||
nil
|
||||
t))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
|
||||
;;; functions.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue