refactor: rename :core module group to :doom

I'll soon introduce a new family of core modules which will house most
of what's currently in the doom-*.el libs, moving them out of core.
This commit is contained in:
Henrik Lissner
2024-10-25 20:38:23 -04:00
parent c23b6fa5db
commit 25201a40f3
5 changed files with 9 additions and 9 deletions

View File

@ -216,7 +216,7 @@ Return its PROPERTY, if specified."
(setq doom-modules (make-hash-table :test 'equal))
;; Register Doom's two virtual module categories, representing Doom's core
;; and the user's config; which are always enabled.
(doom-module--put '(:core . nil) :path doom-core-dir :depth -110)
(doom-module--put '(:doom . nil) :path doom-core-dir :depth -110)
(doom-module--put '(:user . nil) :path doom-user-dir :depth '(-105 . 105))
;; DEPRECATED: I intend to phase out our internal usage of `use-package' and
;; move it to a :config use-package module. The macro is far too complex
@ -378,7 +378,7 @@ cdr. See `doom-module-put' for details about the :depth property."
PATHS-OR-ALL can either be a non-nil value or a list of directories. If given a
list of directories, return a list of module keys for all modules present
underneath it. If non-nil, return the same, but search `doom-module-load-path'
(includes :core and :user). Modules that are enabled are sorted first by their
(includes :doom and :user). Modules that are enabled are sorted first by their
:depth, followed by disabled modules in lexicographical order (unless a :depth
is specified in their .doommodule).
@ -453,7 +453,7 @@ If ENABLED-ONLY?, return nil if the containing module isn't enabled."
(doom-module-active-p group name))
(cons group name))))
((string-match (concat "^" (regexp-quote doom-core-dir)) path)
(cons :core nil))
(cons :doom nil))
((string-match (concat "^" (regexp-quote doom-user-dir)) path)
(cons :user nil))))))

View File

@ -252,7 +252,7 @@ uses a straight or package.el command directly).")
"Ensure `straight' is installed and was compiled with this version of Emacs."
(when (or force-p (null (bound-and-true-p straight-recipe-repositories)))
(doom-log "Initializing straight")
(let ((packages (doom-package-list '((:core)))))
(let ((packages (doom-package-list '((:doom)))))
(cl-destructuring-bind (&key recipe pin &allow-other-keys)
(alist-get 'straight packages)
(doom--ensure-straight recipe pin))
@ -445,7 +445,7 @@ installed."
If MODULE-LIST is omitted, read enabled module list in configdepth order (see
`doom-module-set'). Otherwise, MODULE-LIST may be any symbol (or t) to mean read
all modules in `doom-modules-dir', including :core and :user. MODULE-LIST may
all modules in `doom-modules-dir', including :doom and :user. MODULE-LIST may
also be a list of module keys."
(let ((module-list (cond ((null module-list) (doom-module-list))
((symbolp module-list) (doom-module-list 'all))

View File

@ -412,7 +412,7 @@ Defaults to the profile at `doom-profile-default'."
(let ((noextfile (file-name-sans-extension file)))
`(with-doom-module ',key
,(pcase key
('(:core . nil)
('(:doom . nil)
`(doom-load
(file-name-concat
doom-core-dir ,(file-name-nondirectory noextfile))

View File

@ -1,7 +1,7 @@
;;; lisp/init.el -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; :core is now treated like a normal module, and this is its (temporary) init
;; :doom is now treated like a normal module, and this is its (temporary) init
;; file, which will be removed once we've resolved our `use-package' dependency
;; (which will soon be moved to its own module), then these will be returned to
;; the profile init file.

View File

@ -365,7 +365,7 @@ without needing to check if they are available."
(format "%s %s" (nth 1 sexp) (nth 2 sexp)))))))
((when buffer-file-name
(when-let (mod (doom-module-from-path buffer-file-name))
(unless (memq (car mod) '(:core :user))
(unless (memq (car mod) '(:doom :user))
(format "%s %s" (car mod) (cdr mod))))))
((when-let (mod (cdr (assq major-mode doom--help-major-mode-module-alist)))
(format "%s %s"
@ -627,7 +627,7 @@ If prefix arg is present, refresh the cache."
(insert "Declared by the following Doom modules:\n")
(dolist (m modules)
(let* ((module-path (pcase (car m)
(:core doom-core-dir)
(:doom doom-core-dir)
(:user doom-user-dir)
(category
(doom-module-locate-path (cons category (cdr m))))))