From a1fd11a28f3c2f4f81163765dd3b53e5ce0b39cf Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 21 Jun 2021 14:50:59 +0200 Subject: [PATCH] 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. --- lisp/files.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.39.2