diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 92ef89fe2..700e0523c 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -134,10 +134,8 @@ one wants that.") (form)))) (defun doom-cli--generate-autoloads-autodefs (file buffer module &optional module-enabled-p) - (with-current-buffer - (or (get-file-buffer file) - (autoload-find-file file)) - (goto-char (point-min)) + (with-temp-buffer + (insert-file-contents file) (while (re-search-forward "^;;;###autodef *\\([^\n]+\\)?\n" nil t) (let* ((standard-output buffer) (form (read (current-buffer)))