From: Lars Ingebrigtsen Date: Mon, 21 Jun 2021 12:50:59 +0000 (+0200) Subject: Make find-file-literally ignore local variables again X-Git-Tag: emacs-28.0.90~2066 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1fd11a28f3c2f4f81163765dd3b53e5ce0b39cf;p=emacs.git 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. --- diff --git a/lisp/files.el b/lisp/files.el index 2450daf5bfc..13dda0932a2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)