Use actual compilation directory instead of PWD

This commit is contained in:
Tom Willemse 2018-06-07 00:57:28 -07:00
parent eccd076ed6
commit 3ed11cacfe

View file

@ -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 "^[^.]"))
(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)))
(let ((loaddefs (format "%ssite-lisp/site-autoloads.el" load-directory)))
(when (file-exists-p loaddefs)
(load loaddefs))))
(load loaddefs)))))
(require 'oni-helpers)