From: Richard M. Stallman Date: Thu, 28 Sep 2006 18:45:58 +0000 (+0000) Subject: (after-insert-file-set-coding): X-Git-Tag: emacs-pretest-22.0.90~317 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa601de5de492eceef93d6c4d76378e4edf0111f;p=emacs.git (after-insert-file-set-coding): If VISIT, don't let set-buffer-multibyte make undo info. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 31e3b5cedb0..cea1a917be5 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1864,7 +1864,13 @@ The optional second arg VISIT non-nil means that we are visiting a file." (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)