diff options
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r-- | emacs/.emacs.d/init.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 12c98a8..69f3773 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -26,17 +26,20 @@ ;;; Code: (eval-and-compile - (add-to-list 'load-path (format "%sinit/" default-directory)) + (let ((load-directory + (file-name-directory + (or load-file-name byte-compile-current-file)))) + (add-to-list 'load-path (format "%sinit/" load-directory)) - (mapc (lambda (d) (add-to-list 'load-path d)) - (directory-files - (format "%svendor-lisp/" default-directory) t "^[^.]")) + (mapc (lambda (d) (add-to-list 'load-path d)) + (directory-files + (format "%svendor-lisp/" load-directory) t "^[^.]")) - (add-to-list 'load-path (format "%ssite-lisp/" default-directory)) + (add-to-list 'load-path (format "%ssite-lisp/" load-directory)) - (let ((loaddefs (format "%ssite-lisp/site-autoloads.el" default-directory))) - (when (file-exists-p loaddefs) - (load loaddefs)))) + (let ((loaddefs (format "%ssite-lisp/site-autoloads.el" load-directory))) + (when (file-exists-p loaddefs) + (load loaddefs))))) (require 'oni-helpers) |