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.
This commit is contained in:
Henrik Lissner 2020-01-30 19:39:36 -05:00
parent 9a0e029135
commit 53d799f377
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

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