Make package install not bug out on weird stuff in find-file-hooks

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file):
Users may have read-only-mode in find-file-hooks (bug#43460) so
just disable all the hooks here.
This commit is contained in:
Lars Ingebrigtsen 2020-09-17 18:02:44 +02:00
parent f7e68759d0
commit 64ba14f366

View file

@ -258,6 +258,7 @@ expression, in which case we want to handle forms differently."
"Visit the autoload file for the current buffer, and return its buffer." "Visit the autoload file for the current buffer, and return its buffer."
(let ((enable-local-variables :safe) (let ((enable-local-variables :safe)
(enable-local-eval nil) (enable-local-eval nil)
(find-file-hooks nil)
(delay-mode-hooks t) (delay-mode-hooks t)
(file (autoload-generated-file))) (file (autoload-generated-file)))
;; We used to use `raw-text' to read this file, but this causes ;; We used to use `raw-text' to read this file, but this causes