Refactor core-load-paths to an in-lined form
- Remove the two functions that add directories to the load path. - Inline the body forms of the functions to be removed. - Rename the variables to be more explicit. Fix let varlist in core-load-path.el
This commit is contained in:
parent
d7bcc5c716
commit
b5ae2fc3b2
|
@ -114,20 +114,11 @@
|
|||
(setq pcache-directory (concat spacemacs-cache-directory "pcache/"))
|
||||
|
||||
;;;; Load Paths
|
||||
;; TODO: Since these functions are not called anywhere, consider to inline them (Apr 27 2021 Lucius)
|
||||
|
||||
(defun spacemacs//add-to-load-path (dir)
|
||||
"Prepend DIR to `load-path'."
|
||||
(add-to-list 'load-path dir))
|
||||
|
||||
;; FIXME: unused function (Apr 25 2021 Lucius)
|
||||
(defun spacemacs//add-to-load-path-if-exists (dir)
|
||||
"If DIR exists in the file system, prepend it to `load-path'."
|
||||
(when (file-exists-p dir)
|
||||
(spacemacs//add-to-load-path dir)))
|
||||
|
||||
(dolist (suffix '(nil "libs/" "libs/spacemacs-theme/" "libs/forks"))
|
||||
(spacemacs//add-to-load-path (concat spacemacs-core-directory suffix)))
|
||||
(dolist (subdirectory '(nil "libs/" "libs/spacemacs-theme/" "libs/forks/"))
|
||||
(let ((path (concat spacemacs-core-directory subdirectory)))
|
||||
(if (file-exists-p path)
|
||||
(add-to-list 'load-path path)
|
||||
(error "The directory %s does not exist and cannot be added to the `load-path'." path))))
|
||||
|
||||
;;;; Themes
|
||||
(add-to-list 'custom-theme-load-path (concat spacemacs-core-directory
|
||||
|
|
Loading…
Reference in New Issue