refactor(lib): convert cli/autoloads.el to lib

This commit is contained in:
Henrik Lissner 2022-09-16 10:31:55 +02:00
parent 7ea4b21953
commit b804a2f34f
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 59 additions and 58 deletions

View file

@ -245,11 +245,7 @@ SEE ALSO:
;; There are a lot of CLIs, and some have expensive initialization, so best we
;; load them lazily.
(let ((dir (doom-path doom-core-dir "cli")))
;; Library for generating autoloads files for Doom modules & packages.
(load! "autoloads" dir)
(defcli-group!
(defcli-group!
:prefix 'doom
;; Import this for implicit 'X help' commands for your script:
(defcli-alias! ((help h)) (:root :help))
@ -308,7 +304,7 @@ SEE ALSO:
((setq doomrc (getenv "DOOMRC"))
(load! doomrc))
((setq doomrc (locate-dominating-file default-directory ".doomrc"))
(load! ".doomrc" doomrc))))))
(load! ".doomrc" doomrc)))))
;;

View file

@ -69,7 +69,7 @@
(doom-require 'doom-lib 'plist)
(doom-require 'doom-lib 'files)
(doom-require 'doom-lib 'print)
;; (doom-require 'doom-lib 'autoloads)
(doom-require 'doom-lib 'autoloads)
;; Ensure straight and core packages are ready to go for CLI commands.
(require 'doom-modules)

View file

@ -1,4 +1,6 @@
;;; lisp/cli/autoloads.el -*- lexical-binding: t; -*-
;;; lisp/lib/autoloads.el -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(defvar doom-autoloads-excluded-packages ()
"Which packages to exclude from Doom's autoloads files.
@ -192,3 +194,6 @@ non-nil, treat FILES as pre-generated autoload files instead."
(not literal))
autoloads))
(end-of-file))))))))
(provide 'doom-lib '(autoloads))
;;; autoloads.el end here