improve autoloads
This commit is contained in:
@@ -55,7 +55,7 @@ Fallbacks to `user-emacs-directory' if this file is not loaded.")
|
||||
;; path where settings files are kept
|
||||
(add-to-list 'load-path (concat config-dir "settings"))
|
||||
;; add personal elisp lib dir, for manually installed packages
|
||||
(defun add-to-load-path-with-subdirs (base exclude-list include-list)
|
||||
(defun add-to-load-path-with-subdirs (base &optional exclude-list include-list autoloads)
|
||||
"This will add all first level dirs from BASE and exclude the ones in
|
||||
EXCLUDE-LIST, while for the dirs in INCLUDE-LIST, it will add all the
|
||||
first level dirs of that dir too.
|
||||
@@ -66,9 +66,14 @@ Fallbacks to `user-emacs-directory' if this file is not loaded.")
|
||||
(when (and (file-directory-p name)
|
||||
(not (member f exclude-list)))
|
||||
(add-to-list 'load-path name)
|
||||
(when autoloads
|
||||
(let ((fileal (concat name "/" (file-name-base name) "-autoloads.el"))
|
||||
(nameal (concat (file-name-base name) "-autoloads")))
|
||||
(when (file-exists-p fileal)
|
||||
(require (intern nameal) fileal) )))
|
||||
(when (member f include-list)
|
||||
(add-to-load-path-with-subdirs name exclude-list include-list))))))
|
||||
(add-to-load-path-with-subdirs (concat config-dir "lisp") '("." ".." "0patches") nil))
|
||||
(add-to-load-path-with-subdirs (concat config-dir "lisp") '("." ".." "0patches") nil t))
|
||||
|
||||
|
||||
;;; Load pre-early-init.el
|
||||
|
||||
Reference in New Issue
Block a user