 
 (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


(defun doom--generate-header (func)
  (goto-char (point-min))
  (insert ";; -*- lexical-binding:t; byte-compile-dynamic-docstrings: t; -*-\n"
          ";; This file is autogenerated by `" (symbol-name func) "', DO NOT EDIT !!\n\n"))

(defun doom--generate-autoloads (targets)

                nil t))
      ((debug error)
       (let ((backup-file (concat file ".bk")))
         (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))))))
