# HG changeset patch # User Lars Hansen # Date 1068038897 0 # Node ID c9843219861ede41a12902adfee947d6d020f223 # Parent 79178080aec68323c246dd9bed25184db35ac4e0 (desktop-locals-to-save): Add buffer-file-coding-system. (desktop-buffer-file): Use saved buffer-file-coding-system for file reading. Set auto-insert to nil to prevent automatic insertion into restored empty files. diff -r 79178080aec6 -r c9843219861e lisp/desktop.el --- a/lisp/desktop.el Wed Nov 05 05:11:41 2003 +0000 +++ b/lisp/desktop.el Wed Nov 05 13:28:17 2003 +0000 @@ -227,7 +227,8 @@ fill-column overwrite-mode change-log-default-name - line-number-mode) + line-number-mode + buffer-file-coding-system) "List of local variables to save for each buffer. The variables are saved only when they really are local." :type '(repeat symbol) @@ -872,7 +873,12 @@ (y-or-n-p (format "File \"%s\" no longer exists. Re-create? " desktop-buffer-file-name)))) - (let ((buf (find-file-noselect desktop-buffer-file-name))) + (let* ((auto-insert nil) ; Disable auto insertion + (coding-system-for-read + (or coding-system-for-read + (cdr (assq 'buffer-file-coding-system + desktop-buffer-locals)))) + (buf (find-file-noselect desktop-buffer-file-name))) (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf)))