]> git.eshelyaron.com Git - emacs.git/commitdiff
* files.el (hack-local-variables-confirm): Set
authorChong Yidong <cyd@stupidchicken.com>
Wed, 8 Mar 2006 02:24:47 +0000 (02:24 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 8 Mar 2006 02:24:47 +0000 (02:24 +0000)
coding-system-for-read to nil before writing to .emacs.

lisp/ChangeLog
lisp/files.el

index 7d5dbce1d35e9c36c1e798b4747c603e8d9e3fbb..50698da7cc3c42a053a35a8a25016182365055cf 100644 (file)
@@ -1,5 +1,8 @@
 2006-03-07  Chong Yidong  <cyd@stupidchicken.com>
 
+       * 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.
 
index db3309fcf0abcdba4a8741b94e9a66734dcee352..fc6267fd002f43f9cb46de8cbb073649fa09fd8f 100644 (file)
@@ -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)