diff options
author | Tom Willemsen | 2018-06-06 20:54:46 -0700 |
---|---|---|
committer | Tom Willemsen | 2018-06-06 20:56:28 -0700 |
commit | 5b68ca4f9116e78851fabc6aeb3b1036a6ed2c0f (patch) | |
tree | 446ac349cfa27e5501e891252f1ce96c43031bf9 | |
parent | d43e1f579bbae8db84916cc86786c398b8527da9 (diff) | |
download | new-dotfiles-5b68ca4f9116e78851fabc6aeb3b1036a6ed2c0f.tar.gz new-dotfiles-5b68ca4f9116e78851fabc6aeb3b1036a6ed2c0f.zip |
Don't require everything to be set-up in .emacs.d
The first time (at least) when I compile I won't have anything
available in ‘~/.emacs.d’, so load relative to the directory the
compilation is happening in.
On Windows it will likely always be the case that ‘~/.emacs.d’ is
running behind the directory compilation is happening in, since it
doesn’t support proper symbolic links, and will probably get a special
‘install’ target in the Makefile to copy all the compiled files over.
-rw-r--r-- | emacs/.emacs.d/init.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index ab4a045..993965a 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -25,16 +25,16 @@ ;;; Code: -(add-to-list 'load-path (locate-user-emacs-file "init/")) - (eval-and-compile + (add-to-list 'load-path (format "%sinit/" default-directory)) + (mapc (lambda (d) (add-to-list 'load-path d)) (directory-files - (locate-user-emacs-file "vendor-lisp/") t "^[^.]"))) + (format "%svendor-lisp/" default-directory) t "^[^.]")) -(eval-and-compile - (add-to-list 'load-path (locate-user-emacs-file "site-lisp/")) - (let ((loaddefs (locate-user-emacs-file "site-lisp/site-autoloads.el"))) + (add-to-list 'load-path (format "%ssite-lisp/" default-directory)) + + (let ((loaddefs (format "%ssite-lisp/site-autoloads.el" default-directory))) (when (file-exists-p loaddefs) (load loaddefs)))) |