From 5b68ca4f9116e78851fabc6aeb3b1036a6ed2c0f Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 6 Jun 2018 20:54:46 -0700 Subject: 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. --- emacs/.emacs.d/init.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'emacs/.emacs.d') 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)))) -- cgit v1.2.3-54-g00ecf