Change emacs init variables

This commit is contained in:
Tom Willemsen 2011-05-27 21:46:43 +02:00
parent 913844f26f
commit b27fef4711

17
emacs
View file

@ -7,26 +7,25 @@
(setq d-dir "~/.emacs.d/") (setq d-dir "~/.emacs.d/")
(setq elisp-dir (concat d-dir "elisp/")) (setq elisp-dir (concat d-dir "elisp/"))
(setq my-files (directory-files d-dir nil "^[0-9]\\{2\\}-\.*el$")) (setq d-el-files (directory-files d-dir nil "^[0-9]\\{2\\}-\.*el$"))
(setq my-elisp-files (setq elisp-el-files (directory-files elisp-dir nil "\\.el$"))
(directory-files elisp-dir nil "\\.el$"))
;; Compile 3rd party elisp files ;; Compile 3rd party elisp files
(byte-recompile-directory elisp-dir) (byte-recompile-directory elisp-dir)
(while my-elisp-files (while elisp-el-files
(let ((my-elisp-file-name (concat elisp-dir (car my-elisp-files)))) (let ((my-elisp-file-name (concat elisp-dir (car elisp-el-files))))
(if (not (file-exists-p (concat my-elisp-file-name "c"))) (if (not (file-exists-p (concat my-elisp-file-name "c")))
(byte-compile-file my-elisp-file-name)) (byte-compile-file my-elisp-file-name))
(setq my-elisp-files (cdr my-elisp-files)))) (setq elisp-el-files (cdr elisp-el-files))))
;; Compile my elisp files ;; Compile my elisp files
(byte-recompile-directory d-dir) (byte-recompile-directory d-dir)
(while my-files (while d-el-files
(let ((my-file-name (concat d-dir (car my-files)))) (let ((my-file-name (concat d-dir (car d-el-files))))
(if (not (file-exists-p (concat my-file-name "c"))) (if (not (file-exists-p (concat my-file-name "c")))
(byte-compile-file my-file-name)) (byte-compile-file my-file-name))
(load (substring my-file-name 0 (- (length my-file-name) 3))) (load (substring my-file-name 0 (- (length my-file-name) 3)))
(setq my-files (cdr my-files)))) (setq d-el-files (cdr d-el-files))))
(add-to-list 'compilation-finish-functions 'my-comp-finish-function) (add-to-list 'compilation-finish-functions 'my-comp-finish-function)