From: Chong Yidong Date: Wed, 8 Mar 2006 02:24:47 +0000 (+0000) Subject: * files.el (hack-local-variables-confirm): Set X-Git-Tag: emacs-pretest-22.0.90~3742 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4299d849d878519b010c9a0638674673b2482538;p=emacs.git * files.el (hack-local-variables-confirm): Set coding-system-for-read to nil before writing to .emacs. --- 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)