Mercurial > emacs
changeset 22041:e977f2414da5
(after-insert-file-set-buffer-file-coding-system):
Don't make buffer unibyte unless we seem to be visiting a file.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 12 May 1998 23:09:35 +0000 |
parents | ec5ce3eb24f3 |
children | 31e8f7100c12 |
files | lisp/international/mule.el |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule.el Tue May 12 21:33:59 1998 +0000 +++ b/lisp/international/mule.el Tue May 12 23:09:35 1998 +0000 @@ -845,10 +845,12 @@ (modified-p (buffer-modified-p))) (when coding-system (set-buffer-file-coding-system coding-system) - (if (or (eq coding-system 'no-conversion) - (eq (coding-system-type coding-system) 5)) - ;; It seems that random 8-bit codes are read. We had - ;; better edit this buffer without multibyte characters. + (if (and (or (eq coding-system 'no-conversion) + (eq (coding-system-type coding-system) 5)) + ;; If buffer was unmodified, we must be visiting it. + (not modified-p)) + ;; For coding systems no-conversion and raw-text..., + ;; edit the buffer as unibyte. (set-buffer-multibyte nil)) (set-buffer-modified-p modified-p)))) nil)