Bytecompile
Byte-compile and recompile all modules in .emacs.d and .emacs.d/elisp
This commit is contained in:
parent
93ba50adaf
commit
d2ce5467c3
3 changed files with 31 additions and 22 deletions
28
emacs
28
emacs
|
@ -1,14 +1,28 @@
|
||||||
;; -*- mode: Emacs-Lisp; -*-
|
;; -*- mode: Emacs-Lisp; -*-
|
||||||
|
|
||||||
(setq load-dir "~/.emacs.d/")
|
(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
|
(setq my-elisp-files
|
||||||
(let ((myfilename (concat load-dir (car myfiles))))
|
(directory-files elisp-dir nil "\\.el$"))
|
||||||
(if (not (file-exists-p (concat myfilename "c")))
|
(setq my-files (directory-files load-dir nil "^[0-9]\\{2\\}-\.*el$"))
|
||||||
(byte-compile-file myfilename))
|
|
||||||
(load (substring myfilename 0 (- (length myfilename) 3)))
|
;; Compile 3rd party elisp files
|
||||||
(setq myfiles (cdr myfiles))))
|
(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)
|
(add-to-list 'compilation-finish-functions 'my-comp-finish-function)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,2 @@
|
||||||
(add-to-list 'load-path "~/.emacs.d/elisp")
|
(add-to-list 'load-path "~/.emacs.d/elisp")
|
||||||
(add-to-list 'load-path "~/.emacs.d/naquadah-theme")
|
(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")
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
(autoload 'folding-mode "folding" "Folding mode" t)
|
(if (load "folding")
|
||||||
|
(progn (add-hook 'folding-mode-hook
|
||||||
(add-hook 'folding-mode-hook
|
(lambda ()
|
||||||
(lambda ()
|
(local-set-key [C-tab] 'folding-toggle-show-hide)))
|
||||||
(local-set-key [C-tab] 'folding-toggle-show-hide)))
|
(add-hook 'c-mode-hook
|
||||||
|
(lambda ()
|
||||||
(add-hook 'c-mode-hook
|
(folding-mode)))
|
||||||
(lambda ()
|
(add-hook 'emacs-lisp-mode-hook
|
||||||
(folding-mode)))
|
(lambda ()
|
||||||
(add-hook 'emacs-lisp-mode-hook
|
(folding-mode)))))
|
||||||
(lambda ()
|
|
||||||
(folding-mode)))
|
|
||||||
|
|
Loading…
Reference in a new issue