comparison lisp/international/mule.el @ 29504:09063dfdc92c

(after-insert-file-set-buffer-file-coding-system): If the buffer size is greater than INSERTED, judget that we are not visiting.
author Kenichi Handa <handa@m17n.org>
date Thu, 08 Jun 2000 11:12:03 +0000
parents e3253b152060
children 6f22d585904b
comparison
equal deleted inserted replaced
29503:3a54bce05114 29504:09063dfdc92c
1081 (when coding-system 1081 (when coding-system
1082 (set-buffer-file-coding-system coding-system) 1082 (set-buffer-file-coding-system coding-system)
1083 (if (and enable-multibyte-characters 1083 (if (and enable-multibyte-characters
1084 (or (eq coding-system 'no-conversion) 1084 (or (eq coding-system 'no-conversion)
1085 (eq (coding-system-type coding-system) 5)) 1085 (eq (coding-system-type coding-system) 5))
1086 ;; If buffer was unmodified, we must be visiting it. 1086 ;; If buffer was unmodified and the size is the
1087 (not modified-p)) 1087 ;; same as INSERTED, we must be visiting it.
1088 (not modified-p)
1089 (= (buffer-size) inserted))
1088 ;; For coding systems no-conversion and raw-text..., 1090 ;; For coding systems no-conversion and raw-text...,
1089 ;; edit the buffer as unibyte. 1091 ;; edit the buffer as unibyte.
1090 (let ((pos-byte (position-bytes (+ (point) inserted)))) 1092 (let ((pos-byte (position-bytes (+ (point) inserted))))
1091 (set-buffer-multibyte nil) 1093 (set-buffer-multibyte nil)
1092 (setq inserted (- pos-byte (position-bytes (point)))))) 1094 (setq inserted (- pos-byte (position-bytes (point))))))