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.
This commit is contained in:
Tom Willemsen 2018-06-06 20:54:46 -07:00
parent d43e1f579b
commit 5b68ca4f91

View file

@ -25,16 +25,16 @@
;;; Code: ;;; Code:
(add-to-list 'load-path (locate-user-emacs-file "init/"))
(eval-and-compile (eval-and-compile
(add-to-list 'load-path (format "%sinit/" default-directory))
(mapc (lambda (d) (add-to-list 'load-path d)) (mapc (lambda (d) (add-to-list 'load-path d))
(directory-files (directory-files
(locate-user-emacs-file "vendor-lisp/") t "^[^.]"))) (format "%svendor-lisp/" default-directory) t "^[^.]"))
(eval-and-compile (add-to-list 'load-path (format "%ssite-lisp/" default-directory))
(add-to-list 'load-path (locate-user-emacs-file "site-lisp/"))
(let ((loaddefs (locate-user-emacs-file "site-lisp/site-autoloads.el"))) (let ((loaddefs (format "%ssite-lisp/site-autoloads.el" default-directory)))
(when (file-exists-p loaddefs) (when (file-exists-p loaddefs)
(load loaddefs)))) (load loaddefs))))