[emacs] Load scripts from ~/.emacs.local.d

This commit is contained in:
Correl Roush 2014-08-26 08:21:14 -04:00
parent d5cb809938
commit 9d6e416deb

View file

@ -31,14 +31,15 @@
;; Expand Region ;; Expand Region
(global-set-key (kbd "C-=") 'er/expand-region) (global-set-key (kbd "C-=") 'er/expand-region)
;; Load custom init scripts from ~/.emacs.d/init.d (defun load-elisp-directory (path)
;; (let ((file-pattern "\\.elc?$"))
(let ((init-dir "~/.emacs.d/init.d") (when (file-directory-p path)
(file-pattern "\\.elc?$")) (mapcar (lambda (lisp-file)
(when (file-directory-p init-dir) (load-file lisp-file))
(mapcar (lambda (lisp-file) (directory-files (expand-file-name path) t file-pattern)))))
(load-file lisp-file))
(directory-files (expand-file-name init-dir) t file-pattern)))) (load-elisp-directory "~/.emacs.d/init.d")
(load-elisp-directory "~/.emacs.local.d")
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.