bootstrap: compile initial load-path

This commit is contained in:
Henrik Lissner 2016-04-04 17:28:30 -04:00
parent ca9f76bfa6
commit 3bb614ec13

View file

@ -27,7 +27,10 @@
(defconst IS-MAC (eq system-type 'darwin)) (defconst IS-MAC (eq system-type 'darwin))
(defconst IS-LINUX (eq system-type 'gnu/linux)) (defconst IS-LINUX (eq system-type 'gnu/linux))
(defconst IS-WINDOWS (eq system-type 'windows-nt)) (defconst IS-WINDOWS (eq system-type 'windows-nt)))
(eval-when-compile
(defvar narf--load-path load-path)
;; Helper for traversing subdirectories recursively ;; Helper for traversing subdirectories recursively
(defun --subdirs (path &optional include-self) (defun --subdirs (path &optional include-self)
@ -57,14 +60,14 @@
file-name-handler-alist) file-name-handler-alist)
;; Scan various folders to populate the load-paths ;; Scan various folders to populate the load-paths
(defvar narf--load-path load-path)
(setq load-path (setq load-path
(append (list narf-private-dir) (eval-when-compile
(--subdirs narf-core-dir t) (append (list narf-private-dir)
(--subdirs narf-modules-dir t) (--subdirs narf-core-dir t)
(--subdirs narf-packages-dir) (--subdirs narf-modules-dir t)
(--subdirs (expand-file-name "../bootstrap" narf-packages-dir)) (--subdirs narf-packages-dir)
narf--load-path) (--subdirs (expand-file-name "../bootstrap" narf-packages-dir))
narf--load-path))
custom-theme-load-path custom-theme-load-path
(append (list (expand-file-name "themes/" narf-private-dir)) (append (list (expand-file-name "themes/" narf-private-dir))
custom-theme-load-path)) custom-theme-load-path))