diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 611fe160f..2376bd889 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -42,7 +42,7 @@ It also caches `load-path', `Info-directory-list', `doom-disabled-packages', (ignore-errors (delete-file (byte-compile-dest-file file))) t)) -(defun doom--warn-refresh-session () +(defun doom--warn-refresh-session-h () (message "Restart or reload Doom Emacs for changes to take effect:\n") (message " M-x doom/restart-and-restore") (message " M-x doom/restart") @@ -50,12 +50,14 @@ It also caches `load-path', `Info-directory-list', `doom-disabled-packages', (defun doom--reload-files (&rest files) (if noninteractive - (add-hook 'doom-cli-post-execute-hook #'doom--warn-refresh-session) + (add-hook 'doom-cli-post-success-execute-hook #'doom--warn-refresh-session-h) (dolist (file files) (load-file (byte-compile-dest-file file))))) (defun doom--byte-compile-file (file) - (let ((byte-compile-warnings (if doom-debug-mode byte-compile-warnings))) + (let ((byte-compile-warnings (if doom-debug-mode byte-compile-warnings)) + (byte-compile-dynamic t) + (byte-compile-dynamic-docstrings t)) (condition-case e (when (byte-compile-file file) ;; Give autoloads file a chance to report error @@ -65,7 +67,7 @@ It also caches `load-path', `Info-directory-list', `doom-disabled-packages', nil t)) ((debug error) (let ((backup-file (concat file ".bk"))) - (print! (warn "- Copied backup to %s") (relpath backup-file)) + (print! (warn "Copied backup to %s") (relpath backup-file)) (copy-file file backup-file 'overwrite)) (doom-delete-autoloads-file file) (signal 'doom-autoload-error (list file e)))))) @@ -94,7 +96,7 @@ even if it doesn't need reloading!" (defun doom--generate-header (func) (goto-char (point-min)) - (insert ";; -*- lexical-binding:t; byte-compile-dynamic-docstrings: t; -*-\n" + (insert ";; -*- lexical-binding:t; -*-\n" ";; This file is autogenerated by `" (symbol-name func) "', DO NOT EDIT !!\n\n")) (defun doom--generate-autoloads (targets)