From 4299d849d878519b010c9a0638674673b2482538 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 8 Mar 2006 02:24:47 +0000 Subject: [PATCH] * files.el (hack-local-variables-confirm): Set coding-system-for-read to nil before writing to .emacs. --- lisp/ChangeLog | 3 +++ lisp/files.el | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d5dbce1d35..50698da7cc3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-03-07 Chong Yidong + * files.el (hack-local-variables-confirm): Set + coding-system-for-read to nil before writing to .emacs. + * arc-mode.el (archive-extract): Check if an existing buffer name comes from a different archive. diff --git a/lisp/files.el b/lisp/files.el index db3309fcf0a..fc6267fd002 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2404,9 +2404,13 @@ n -- to ignore the local variables list. (when (and (= char ?!) unsafe-vars) (dolist (elt unsafe-vars) (add-to-list 'safe-local-variable-values elt)) - (customize-save-variable - 'safe-local-variable-values - safe-local-variable-values)) + ;; When this is called from desktop-restore-file-buffer, + ;; coding-system-for-read may be non-nil. Reset it before + ;; writing to .emacs. + (let ((coding-system-for-read nil)) + (customize-save-variable + 'safe-local-variable-values + safe-local-variable-values))) (kill-buffer buf) (or (= char ?!) (= char ?\s) -- 2.39.2