1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-28 10:56:36 +00:00

Make find-file-literally ignore local variables again

* lisp/files.el (find-file-noselect-1): Re-inhibit local variables
when loading a file literally (bug#49143).  This was broken by
5bedbe6b1d.
This commit is contained in:
Lars Ingebrigtsen 2021-06-21 14:50:59 +02:00
parent 624c8613e7
commit a1fd11a28f

View File

@ -2429,7 +2429,8 @@ Do you want to revisit the file normally now? ")))
(set-buffer-multibyte t))
(if rawfile
(condition-case ()
(let ((inhibit-read-only t))
(let ((inhibit-read-only t)
(enable-local-variables nil))
(insert-file-contents-literally filename t))
(file-error
(when (and (file-exists-p filename)
@ -2468,7 +2469,7 @@ Do you want to revisit the file normally now? ")))
(not (funcall backup-enable-predicate buffer-file-name))
(setq-local backup-inhibited t))
(if rawfile
(progn
(let ((enable-local-variables nil))
(set-buffer-multibyte nil)
(setq buffer-file-coding-system 'no-conversion)
(set-buffer-major-mode buf)