]> git.eshelyaron.com Git - emacs.git/commitdiff
(cvs-temp-buffer): Undo last ill-conceived change.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 25 Jul 2007 04:50:33 +0000 (04:50 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 25 Jul 2007 04:50:33 +0000 (04:50 +0000)
Replace it with another one which disables undo before calling
erase-buffer and then turns it back on if needed.

lisp/ChangeLog
lisp/pcvs.el

index 1bf1dd1464f803f8f5422d0d5a20b8c086bd0f5d..8b3a50d83c32511d01579dbf166b2b5c6dc0142f 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * pcvs.el (cvs-temp-buffer): Undo last ill-conceived change.
+       Replace it with another one which disables undo before calling
+       erase-buffer and then turns it back on if needed.
+
 2007-07-24  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
        * ps-print.el: Problem with foreground and background color when
 
 2007-07-24  Dan Nicolaescu  <dann@ics.uci.edu>
 
-       * vc-hg.el (vc-hg-revision-completion-table): Temporarily comment
-       out.
+       * vc-hg.el (vc-hg-revision-completion-table): Temporarily comment out.
 
 2007-07-24  Alan Mackenzie  <acm@muc.de>
 
-       * emacs-lisp/bytecomp.el (byte-compile-from-buffer): initialise
-       byte-compile-unresolved-functions before rather than after a
-       compilation.
+       * emacs-lisp/bytecomp.el (byte-compile-from-buffer):
+       Initialise byte-compile-unresolved-functions before rather than
+       after a compilation.
        (byte-compile-unresolved-functions): Amplify doc string.
 
 2007-07-24  Glenn Morris  <rgm@gnu.org>
index c2f7cb79102ac47fa4ba338e917aa5fab6311b48..901110bbfa387872b2f1c401e893ab3dcefa43f0 100644 (file)
@@ -392,17 +392,20 @@ from the current buffer."
     (with-current-buffer buf
       (setq buffer-read-only nil)
       (setq default-directory dir)
-      (unless nosetup (erase-buffer))
+      (unless nosetup
+        ;; Disable undo before calling erase-buffer since it may generate
+        ;; a very large and unwanted undo record.
+        (buffer-disable-undo)
+        (erase-buffer))
       (set (make-local-variable 'cvs-buffer) cvs-buf)
       ;;(cvs-minor-mode 1)
       (let ((lbd list-buffers-directory))
-       (if (fboundp mode) (funcall mode)
-          (fundamental-mode)
-          (buffer-disable-undo))
+       (if (fboundp mode) (funcall mode) (fundamental-mode))
        (when lbd (set (make-local-variable 'list-buffers-directory) lbd)))
       (cvs-minor-mode 1)
       ;;(set (make-local-variable 'cvs-buffer) cvs-buf)
-      (unless normal
+      (if normal
+          (buffer-enable-undo)
        (setq buffer-read-only t)
        (buffer-disable-undo))
       buf)))