Move 'restart Emacs to see changes' message to 'doom sync'

It isn't the autoloads generator's responsibility to do this. The
"changes" referred to consist of more than just the regenerated
autoloads file.
This commit is contained in:
Henrik Lissner 2020-05-26 04:09:11 -04:00
parent 10a4e6570d
commit f4e6d36574
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 4 additions and 8 deletions

View file

@ -80,17 +80,12 @@ one wants that.")
(defun doom-autoloads--compile-file (file) (defun doom-autoloads--compile-file (file)
(condition-case-unless-debug e (condition-case-unless-debug e
(let ((byte-compile-warnings (if doom-debug-p byte-compile-warnings))) (let ((byte-compile-warnings (if doom-debug-p byte-compile-warnings)))
(when (byte-compile-file file) (and (byte-compile-file file)
(unless doom-interactive-p (load (byte-compile-dest-file file) nil t)))
(add-hook 'kill-emacs-hook #'doom-cli--warn-refresh-session-h))
(load (byte-compile-dest-file file) nil t)))
(error (error
(delete-file (byte-compile-dest-file file)) (delete-file (byte-compile-dest-file file))
(signal 'doom-autoload-error (list file e))))) (signal 'doom-autoload-error (list file e)))))
(defun doom-cli--warn-refresh-session-h ()
(print! (info "Restart or 'M-x doom/reload' Doom Emacs for changes to take effect")))
(defun doom-autoloads--cleanup-form (form &optional expand) (defun doom-autoloads--cleanup-form (form &optional expand)
(let ((func (car-safe form))) (let ((func (car-safe form)))
(cond ((memq func '(provide custom-autoload)) (cond ((memq func '(provide custom-autoload))

View file

@ -405,7 +405,8 @@ stale."
(doom-cli-packages-update)) (doom-cli-packages-update))
(doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p)
(run-hooks 'doom-sync-post-hook) (run-hooks 'doom-sync-post-hook)
(doom-autoloads-reload) (when (doom-autoloads-reload)
(print! (info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
t)) t))
(load! "cli/env") (load! "cli/env")