]> git.eshelyaron.com Git - emacs.git/commitdiff
(after-insert-file-set-coding):
authorRichard M. Stallman <rms@gnu.org>
Thu, 28 Sep 2006 18:45:58 +0000 (18:45 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 28 Sep 2006 18:45:58 +0000 (18:45 +0000)
If VISIT, don't let set-buffer-multibyte make undo info.

lisp/international/mule.el

index 31e3b5cedb0f4fa5cb820f69bfc66c79851fb61c..cea1a917be58d6e6c3a894902356cf7b0a5a008a 100644 (file)
@@ -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)