diff options
| author | Lars Hansen | 2003-11-05 13:28:48 +0000 |
|---|---|---|
| committer | Lars Hansen | 2003-11-05 13:28:48 +0000 |
| commit | bd382a27557edf74d24574ce6ec45d04b0ecd744 (patch) | |
| tree | 090bcf8e3175b0ab69efd43bdaaa097757d825a0 /lisp | |
| parent | c617790907205649edc900c1ac6b6ec385420cb5 (diff) | |
| download | emacs-bd382a27557edf74d24574ce6ec45d04b0ecd744.tar.gz emacs-bd382a27557edf74d24574ce6ec45d04b0ecd744.zip | |
(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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/desktop.el | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 534798f1686..1023634b470 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2003-11-05 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * desktop.el (desktop-locals-to-save): Add buffer-file-coding-system. | ||
| 4 | (desktop-buffer-file): Use saved buffer-file-coding-system | ||
| 5 | for file reading. Set auto-insert to nil to prevent automatic | ||
| 6 | insertion into restored empty files. | ||
| 7 | |||
| 1 | 2003-11-04 Luc Teirlinck <teirllm@auburn.edu> | 8 | 2003-11-04 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 9 | ||
| 3 | * files.el (risky-local-variable-p): Make second argument optional. | 10 | * files.el (risky-local-variable-p): Make second argument optional. |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 73fef5c44b7..0cff5e5a21f 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -227,7 +227,8 @@ This variable is maintained for backward compatibility only. Use | |||
| 227 | fill-column | 227 | fill-column |
| 228 | overwrite-mode | 228 | overwrite-mode |
| 229 | change-log-default-name | 229 | change-log-default-name |
| 230 | line-number-mode) | 230 | line-number-mode |
| 231 | buffer-file-coding-system) | ||
| 231 | "List of local variables to save for each buffer. | 232 | "List of local variables to save for each buffer. |
| 232 | The variables are saved only when they really are local." | 233 | The variables are saved only when they really are local." |
| 233 | :type '(repeat symbol) | 234 | :type '(repeat symbol) |
| @@ -872,7 +873,12 @@ directory DIRNAME." | |||
| 872 | (y-or-n-p (format | 873 | (y-or-n-p (format |
| 873 | "File \"%s\" no longer exists. Re-create? " | 874 | "File \"%s\" no longer exists. Re-create? " |
| 874 | desktop-buffer-file-name)))) | 875 | desktop-buffer-file-name)))) |
| 875 | (let ((buf (find-file-noselect desktop-buffer-file-name))) | 876 | (let* ((auto-insert nil) ; Disable auto insertion |
| 877 | (coding-system-for-read | ||
| 878 | (or coding-system-for-read | ||
| 879 | (cdr (assq 'buffer-file-coding-system | ||
| 880 | desktop-buffer-locals)))) | ||
| 881 | (buf (find-file-noselect desktop-buffer-file-name))) | ||
| 876 | (condition-case nil | 882 | (condition-case nil |
| 877 | (switch-to-buffer buf) | 883 | (switch-to-buffer buf) |
| 878 | (error (pop-to-buffer buf))) | 884 | (error (pop-to-buffer buf))) |