changeset 73151:6f8deac73242

(after-insert-file-set-coding): If VISIT, don't let set-buffer-multibyte make undo info.
author Richard M. Stallman <rms@gnu.org>
date Thu, 28 Sep 2006 18:45:58 +0000
parents 18fffec7d7ee
children 645da5a91b56
files lisp/international/mule.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Thu Sep 28 17:18:22 2006 +0000
+++ b/lisp/international/mule.el	Thu Sep 28 18:45:58 2006 +0000
@@ -1864,7 +1864,13 @@
 	      (let ((pos-marker (copy-marker (+ (point) inserted)))
 		    ;; Prevent locking.
 		    (buffer-file-name nil))
-		(set-buffer-multibyte nil)
+		(if visit
+		    ;; If we're doing this for find-file,
+		    ;; don't record undo info; this counts as
+		    ;; part of producing the buffer's initial contents.
+		    (let ((buffer-undo-list t))
+		      (set-buffer-multibyte nil))
+		  (set-buffer-multibyte nil))
 		(setq inserted (- pos-marker (point)))))
 	  (set-buffer-modified-p modified-p))))
   inserted)