diff options
| author | Karl Heuer | 1997-10-19 20:20:15 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-10-19 20:20:15 +0000 |
| commit | d6e8ea6f54806a0e94f637d6ca037c96a4ec4580 (patch) | |
| tree | 4bf1719634b695a0261450a0a7c820eac3de34d6 | |
| parent | 4bb0b3adac0af215be48f12eacb08d2057e75811 (diff) | |
| download | emacs-d6e8ea6f54806a0e94f637d6ca037c96a4ec4580.tar.gz emacs-d6e8ea6f54806a0e94f637d6ca037c96a4ec4580.zip | |
(basic-save-buffer): Set buffer-file-coding-system to
the coding system actually used for saving.
| -rw-r--r-- | lisp/files.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el index 102f0d3ba4f..ad4e7708ebf 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2181,6 +2181,10 @@ After saving the buffer, run `after-save-hook'." | |||
| 2181 | ;; If a hook returned t, file is already "written". | 2181 | ;; If a hook returned t, file is already "written". |
| 2182 | ;; Otherwise, write it the usual way now. | 2182 | ;; Otherwise, write it the usual way now. |
| 2183 | (setq setmodes (basic-save-buffer-1))) | 2183 | (setq setmodes (basic-save-buffer-1))) |
| 2184 | ;; Now we have saved the current buffer. Let's make sure | ||
| 2185 | ;; that buffer-file-coding-system is fixed to what | ||
| 2186 | ;; actually used for saving by binding it locally. | ||
| 2187 | (setq buffer-file-coding-system last-coding-system-used) | ||
| 2184 | (setq buffer-file-number | 2188 | (setq buffer-file-number |
| 2185 | (nthcdr 10 (file-attributes buffer-file-name))) | 2189 | (nthcdr 10 (file-attributes buffer-file-name))) |
| 2186 | (if setmodes | 2190 | (if setmodes |