diff options
| author | Richard M. Stallman | 1998-05-12 23:09:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-12 23:09:35 +0000 |
| commit | ccb77b4efd5653c269845d2aa6206ddc70d0ef7c (patch) | |
| tree | 9384d5dda6c0fd6362e3b63964f4380cf9da2d07 | |
| parent | fd3613d785a1858928f5f40afd4041f2792689d4 (diff) | |
| download | emacs-ccb77b4efd5653c269845d2aa6206ddc70d0ef7c.tar.gz emacs-ccb77b4efd5653c269845d2aa6206ddc70d0ef7c.zip | |
(after-insert-file-set-buffer-file-coding-system):
Don't make buffer unibyte unless we seem to be visiting a file.
| -rw-r--r-- | lisp/international/mule.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 82d9cbcddc9..831d2811897 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -845,10 +845,12 @@ function by default." | |||
| 845 | (modified-p (buffer-modified-p))) | 845 | (modified-p (buffer-modified-p))) |
| 846 | (when coding-system | 846 | (when coding-system |
| 847 | (set-buffer-file-coding-system coding-system) | 847 | (set-buffer-file-coding-system coding-system) |
| 848 | (if (or (eq coding-system 'no-conversion) | 848 | (if (and (or (eq coding-system 'no-conversion) |
| 849 | (eq (coding-system-type coding-system) 5)) | 849 | (eq (coding-system-type coding-system) 5)) |
| 850 | ;; It seems that random 8-bit codes are read. We had | 850 | ;; If buffer was unmodified, we must be visiting it. |
| 851 | ;; better edit this buffer without multibyte characters. | 851 | (not modified-p)) |
| 852 | ;; For coding systems no-conversion and raw-text..., | ||
| 853 | ;; edit the buffer as unibyte. | ||
| 852 | (set-buffer-multibyte nil)) | 854 | (set-buffer-multibyte nil)) |
| 853 | (set-buffer-modified-p modified-p)))) | 855 | (set-buffer-modified-p modified-p)))) |
| 854 | nil) | 856 | nil) |