summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-04-14 20:48:36 +0200
committerGravatar Tom Willemsen2011-04-14 20:49:49 +0200
commitd2ce5467c31ea4b505c1414307fdf374ab53f550 (patch)
treed8ebc8d6b45fa203a0aeeede8409b4685c80c035
parent93ba50adafe2de70c16f4ca4b8db86d25bbe7a4f (diff)
downloaddotfiles-d2ce5467c31ea4b505c1414307fdf374ab53f550.tar.gz
dotfiles-d2ce5467c31ea4b505c1414307fdf374ab53f550.zip
Bytecompile
Byte-compile and recompile all modules in .emacs.d and .emacs.d/elisp
-rw-r--r--emacs28
-rw-r--r--emacs.d/00-paths.el3
-rw-r--r--emacs.d/20-folding.el22
3 files changed, 31 insertions, 22 deletions
diff --git a/emacs b/emacs
index fbdac85..887fbd3 100644
--- a/emacs
+++ b/emacs
@@ -1,14 +1,28 @@
;; -*- mode: Emacs-Lisp; -*-
(setq load-dir "~/.emacs.d/")
-(setq myfiles (directory-files load-dir nil "^[0-9]\\{2\\}-\.*el$"))
+(setq elisp-dir (concat load-dir "elisp/"))
-(while myfiles
- (let ((myfilename (concat load-dir (car myfiles))))
- (if (not (file-exists-p (concat myfilename "c")))
- (byte-compile-file myfilename))
- (load (substring myfilename 0 (- (length myfilename) 3)))
- (setq myfiles (cdr myfiles))))
+(setq my-elisp-files
+ (directory-files elisp-dir nil "\\.el$"))
+(setq my-files (directory-files load-dir nil "^[0-9]\\{2\\}-\.*el$"))
+
+;; Compile 3rd party elisp files
+(byte-recompile-directory elisp-dir)
+(while my-elisp-files
+ (let ((my-elisp-file-name (concat elisp-dir (car my-elisp-files))))
+ (if (not (file-exists-p (concat my-elisp-file-name "c")))
+ (byte-compile-file my-elisp-file-name))
+ (setq my-elisp-files (cdr my-elisp-files))))
+
+;; Compile my elisp files
+(byte-recompile-directory load-dir)
+(while my-files
+ (let ((my-file-name (concat load-dir (car my-files))))
+ (if (not (file-exists-p (concat my-file-name "c")))
+ (byte-compile-file my-file-name))
+ (load (substring my-file-name 0 (- (length my-file-name) 3)))
+ (setq my-files (cdr my-files))))
(add-to-list 'compilation-finish-functions 'my-comp-finish-function)
diff --git a/emacs.d/00-paths.el b/emacs.d/00-paths.el
index 1990c59..e883739 100644
--- a/emacs.d/00-paths.el
+++ b/emacs.d/00-paths.el
@@ -1,5 +1,2 @@
(add-to-list 'load-path "~/.emacs.d/elisp")
(add-to-list 'load-path "~/.emacs.d/naquadah-theme")
-(add-to-list 'load-path "~/.emacs.d/auto-complete-clang")
-(add-to-list 'load-path "~/.emacs.d/nxhtml")
-(add-to-list 'load-path "~/.emacs.d/elisp/muse")
diff --git a/emacs.d/20-folding.el b/emacs.d/20-folding.el
index f59c11a..fcf7cc4 100644
--- a/emacs.d/20-folding.el
+++ b/emacs.d/20-folding.el
@@ -1,12 +1,10 @@
-(autoload 'folding-mode "folding" "Folding mode" t)
-
-(add-hook 'folding-mode-hook
- (lambda ()
- (local-set-key [C-tab] 'folding-toggle-show-hide)))
-
-(add-hook 'c-mode-hook
- (lambda ()
- (folding-mode)))
-(add-hook 'emacs-lisp-mode-hook
- (lambda ()
- (folding-mode)))
+(if (load "folding")
+ (progn (add-hook 'folding-mode-hook
+ (lambda ()
+ (local-set-key [C-tab] 'folding-toggle-show-hide)))
+ (add-hook 'c-mode-hook
+ (lambda ()
+ (folding-mode)))
+ (add-hook 'emacs-lisp-mode-hook
+ (lambda ()
+ (folding-mode)))))