Remove autoload/modules library

Move batch commands into core-dispatcher and doom//reload into
autoload/help. It will soon be renamed doom/reload.
This commit is contained in:
Henrik Lissner 2018-06-11 23:20:45 +02:00
parent 0741c8851a
commit 0be2be5c82
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 393 additions and 394 deletions

View file

@ -179,3 +179,33 @@ whose car is the list of faces and cadr is the list of overlay faces."
(defun doom//open-manual ()
(interactive)
(find-file (expand-file-name "index.org" doom-docs-dir)))
;;;###autoload
(defun doom//reload (&optional force-p)
"Reloads your config. This is experimental!
If called from a noninteractive session, this will try to communicate with a
live server (if one is found) to tell it to run this function.
If called from an interactive session, tries to reload autoloads files (if
necessary), reinistalize doom (via `doom-initialize') and reloads your private
init.el and config.el. Then runs `doom-reload-hook'."
(interactive)
(cond ((and noninteractive (not (daemonp)))
(require 'server)
(if (not (server-running-p))
(doom//reload-autoloads force-p)
(print! "Reloading active Emacs session...")
(print!
(bold "%%s")
(if (server-eval-at server-name '(doom//reload))
(green "Done!")
(red "There were issues!")))))
((let ((load-prefer-newer t))
(doom//reload-autoloads force-p)
(doom-initialize 'force)
(with-demoted-errors "PRIVATE CONFIG ERROR: %s"
(doom-initialize-modules 'force))
(print! (green "%d packages reloaded" (length package-alist)))
(run-hooks 'doom-reload-hook)
t))))