doom--module-pairs => doom-module-pairs

This commit is contained in:
Henrik Lissner 2017-11-08 22:45:52 +01:00
parent f65b6fcddd
commit 211977e28a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 7 additions and 7 deletions

View file

@ -283,7 +283,7 @@
(indented 4 (indented 4
(columns 3 23 (columns 3 23
(mapcar (lambda (x) (format "+%s" x)) (mapcar (lambda (x) (format "+%s" x))
(mapcar #'cdr (doom--module-pairs))))))) (mapcar #'cdr (doom-module-pairs)))))))
(when (and (bound-and-true-p doom-packages) (when (and (bound-and-true-p doom-packages)
(require 'package nil t)) (require 'package nil t))

View file

@ -25,7 +25,7 @@ submodule in the format, e.g. ':feature evil')."
nil t))) nil t)))
(cl-destructuring-bind (category submodule) (cl-destructuring-bind (category submodule)
(mapcar #'intern (split-string module " ")) (mapcar #'intern (split-string module " "))
(unless (member (cons category submodule) (doom--module-pairs)) (unless (member (cons category submodule) (doom-module-pairs))
(error "'%s' isn't a valid module" module)) (error "'%s' isn't a valid module" module))
(let ((doc-path (expand-file-name "README.org" (doom-module-path category submodule)))) (let ((doc-path (expand-file-name "README.org" (doom-module-path category submodule))))
(unless (file-exists-p doc-path) (unless (file-exists-p doc-path)

View file

@ -41,7 +41,7 @@ If neither is available, run all tests in all enabled modules."
(let ((noninteractive t) (let ((noninteractive t)
doom-modules) doom-modules)
(load (expand-file-name "init.test.el" user-emacs-directory) nil t) (load (expand-file-name "init.test.el" user-emacs-directory) nil t)
(setq modules (doom--module-pairs) (setq modules (doom-module-pairs)
targets (list (expand-file-name "test/" doom-core-dir)))))) targets (list (expand-file-name "test/" doom-core-dir))))))
;; resolve targets to a list of test files and load them ;; resolve targets to a list of test files and load them
(cl-loop with targets = (cl-loop with targets =

View file

@ -213,13 +213,13 @@ This aggressively reloads core autoload files."
(let (noninteractive) (let (noninteractive)
(funcall load-fn (doom-module-path :private user-login-name "init.el") t)) (funcall load-fn (doom-module-path :private user-login-name "init.el") t))
(mapc load-fn (file-expand-wildcards (expand-file-name "autoload/*.el" doom-core-dir))) (mapc load-fn (file-expand-wildcards (expand-file-name "autoload/*.el" doom-core-dir)))
(cl-loop for (module . submodule) in (doom--module-pairs) (cl-loop for (module . submodule) in (doom-module-pairs)
for path = (doom-module-path module submodule "config.el") for path = (doom-module-path module submodule "config.el")
do (funcall load-fn path t)))) do (funcall load-fn path t))))
(when (or force-p (not doom-packages)) (when (or force-p (not doom-packages))
(setq doom-packages nil) (setq doom-packages nil)
(funcall load-fn (expand-file-name "packages.el" doom-core-dir)) (funcall load-fn (expand-file-name "packages.el" doom-core-dir))
(cl-loop for (module . submodule) in (doom--module-pairs) (cl-loop for (module . submodule) in (doom-module-pairs)
for path = (doom-module-path module submodule "packages.el") for path = (doom-module-path module submodule "packages.el")
do (funcall load-fn path t))))) do (funcall load-fn path t)))))
(doom|finalize)) (doom|finalize))
@ -274,7 +274,7 @@ Used by `require!' and `depends-on!'."
(doom-enlist (or flags t)) (doom-enlist (or flags t))
doom-modules)) doom-modules))
(defun doom--module-pairs () (defun doom-module-pairs ()
"Returns `doom-modules' as a list of (MODULE . SUBMODULE) cons cells. The list "Returns `doom-modules' as a list of (MODULE . SUBMODULE) cons cells. The list
is sorted by order of insertion unless ALL-P is non-nil. If ALL-P is non-nil, is sorted by order of insertion unless ALL-P is non-nil. If ALL-P is non-nil,
include all modules, enabled or otherwise." include all modules, enabled or otherwise."
@ -320,7 +320,7 @@ MODULES is an malformed plist of modules to load."
(unless noninteractive (unless noninteractive
(load ,(doom-module-path :private user-login-name "init") t t) (load ,(doom-module-path :private user-login-name "init") t t)
,@(cl-loop for (module . submodule) in (doom--module-pairs) ,@(cl-loop for (module . submodule) in (doom-module-pairs)
collect `(require! ,module ,submodule nil t)) collect `(require! ,module ,submodule nil t))
(when (display-graphic-p) (when (display-graphic-p)