# HG changeset patch # User Chong Yidong # Date 1141784687 0 # Node ID e1685cc1a657f738280dd81b5f3c45a77b85de38 # Parent 619b0c2000a68de1db2304d66fe342321cd0cf7a * files.el (hack-local-variables-confirm): Set coding-system-for-read to nil before writing to .emacs. diff -r 619b0c2000a6 -r e1685cc1a657 lisp/ChangeLog --- a/lisp/ChangeLog Wed Mar 08 01:57:59 2006 +0000 +++ b/lisp/ChangeLog Wed Mar 08 02:24:47 2006 +0000 @@ -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 -r 619b0c2000a6 -r e1685cc1a657 lisp/files.el --- a/lisp/files.el Wed Mar 08 01:57:59 2006 +0000 +++ b/lisp/files.el Wed Mar 08 02:24:47 2006 +0000 @@ -2404,9 +2404,13 @@ (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)