From 53d799f377f814a112299b7696f69dbd9533872d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 19:39:36 -0500 Subject: [PATCH] Reduce file init work when reading autoloads Should suppress Emacs trying to read file-local variables and/or attempts to open TAGS files for the current project. --- core/cli/autoloads.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)))