mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor: register :core & :user as virtual modules
...that are always enabled. This way, the module API treats them as any other module. This also changes doom-module-load-path. If supplied directories, doom-user-dir will not be the CAR of its return value. If no dirs are supplied, then doom-core-dir and doom-user-dir are included (and will always be the first two items in the returned list).
This commit is contained in:
@ -56,7 +56,7 @@ hoist buggy forms into autoloads.")
|
||||
(doom-autoloads--scan
|
||||
(append (doom-glob doom-core-dir "lib/*.el")
|
||||
(cl-loop for dir
|
||||
in (append (cdr (doom-module-load-path 'all-p))
|
||||
in (append (doom-module-load-path doom-modules-dirs)
|
||||
(list doom-user-dir))
|
||||
if (doom-glob dir "autoload.el") collect (car it)
|
||||
if (doom-glob dir "autoload/*.el") append it)
|
||||
@ -198,8 +198,7 @@ hoist buggy forms into autoloads.")
|
||||
(generated-autoload-load-name (file-name-sans-extension file))
|
||||
(target-buffer (current-buffer))
|
||||
(module (doom-module-from-path file))
|
||||
(module-enabled-p (and (or (memq (car module) '(:core :user))
|
||||
(doom-module-p (car module) (cdr module)))
|
||||
(module-enabled-p (and (doom-module-p (car module) (cdr module))
|
||||
(doom-file-cookie-p file "if" t))))
|
||||
(save-excursion
|
||||
(when module-enabled-p
|
||||
|
@ -41,7 +41,7 @@ and your private config files, respectively. To recompile your packages, use
|
||||
;; Only compile Doom's modules
|
||||
(doom-rpartial #'file-in-directory-p doom-emacs-dir)
|
||||
;; Omit `doom-user-dir', which is always first
|
||||
(cdr (doom-module-load-path)))))
|
||||
(doom-module-load-path))))
|
||||
recompile-p
|
||||
verbose-p))
|
||||
|
||||
|
Reference in New Issue
Block a user