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))))
(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)))