Use actual compilation directory instead of PWD
This commit is contained in:
parent
eccd076ed6
commit
3ed11cacfe
1 changed files with 11 additions and 8 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue