Commit 136e48e4 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(after-insert-file-set-buffer-file-coding-system): If the buffer

size is greater than INSERTED, judget that we are not visiting.
parent d3981b49
......@@ -1083,8 +1083,10 @@ function by default."
(if (and enable-multibyte-characters
(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))
;; If buffer was unmodified and the size is the
;; same as INSERTED, we must be visiting it.
(not modified-p)
(= (buffer-size) inserted))
;; For coding systems no-conversion and raw-text...,
;; edit the buffer as unibyte.
(let ((pos-byte (position-bytes (+ (point) inserted))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment