Skip to content

Commit

Permalink
Use auto-compile in place of hand-rolled equivalent
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Dec 17, 2012
1 parent a65a65a commit 232553b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions init-elpa.el
Expand Up @@ -99,6 +99,7 @@ ARCHIVE is the string name of the package archive.")
(require-package 'ido-ubiquitous)
(when (< emacs-major-version 24)
(require-package 'color-theme))
(require-package 'auto-compile)
(require-package 'auto-complete)
(require-package 'ace-jump-mode)
(require-package 'fill-column-indicator)
Expand Down
13 changes: 3 additions & 10 deletions init-lisp.el
Expand Up @@ -68,16 +68,9 @@
;; Automatic byte compilation
;; ----------------------------------------------------------------------------

(defun maybe-byte-compile ()
(when (and (eq major-mode 'emacs-lisp-mode)
buffer-file-name
(string-match "\\.el$" buffer-file-name)
(not (string-match "\\.dir-locals.el$" buffer-file-name)))
(save-excursion (byte-compile-file buffer-file-name))))


(add-hook 'after-save-hook 'maybe-byte-compile)

(auto-compile-on-save-mode 1)
;; TODO: also use auto-compile-on-load-mode
;; TODO: exclude .dir-locals.el

;; ----------------------------------------------------------------------------
;; Highlight current sexp
Expand Down

0 comments on commit 232553b

Please sign in to comment.