[Fix #378] Add folders recursively to the load-path in prelude-add-subfolders-to-load-path
This commit is contained in:
parent
ab2107a5ba
commit
09635ea870
1 changed files with 3 additions and 2 deletions
5
init.el
5
init.el
|
@ -61,13 +61,14 @@ by Prelude.")
|
||||||
(make-directory prelude-savefile-dir))
|
(make-directory prelude-savefile-dir))
|
||||||
|
|
||||||
(defun prelude-add-subfolders-to-load-path (parent-dir)
|
(defun prelude-add-subfolders-to-load-path (parent-dir)
|
||||||
"Add all first level PARENT-DIR subdirs to the `load-path'."
|
"Add all level PARENT-DIR subdirs to the `load-path'."
|
||||||
(dolist (f (directory-files parent-dir))
|
(dolist (f (directory-files parent-dir))
|
||||||
(let ((name (expand-file-name f parent-dir)))
|
(let ((name (expand-file-name f parent-dir)))
|
||||||
(when (and (file-directory-p name)
|
(when (and (file-directory-p name)
|
||||||
(not (equal f ".."))
|
(not (equal f ".."))
|
||||||
(not (equal f ".")))
|
(not (equal f ".")))
|
||||||
(add-to-list 'load-path name)))))
|
(add-to-list 'load-path name)
|
||||||
|
(prelude-add-subfolders-to-load-path name)))))
|
||||||
|
|
||||||
;; add Prelude's directories to Emacs's `load-path'
|
;; add Prelude's directories to Emacs's `load-path'
|
||||||
(add-to-list 'load-path prelude-core-dir)
|
(add-to-list 'load-path prelude-core-dir)
|
||||||
|
|
Loading…
Reference in a new issue