changeset 78239:be7fbb40c851

(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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 25 Jul 2007 04:50:33 +0000
parents 241961c1ec37
children 450fa81c5930
files lisp/ChangeLog lisp/pcvs.el
diffstat 2 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jul 25 04:50:21 2007 +0000
+++ b/lisp/ChangeLog	Wed Jul 25 04:50:33 2007 +0000
@@ -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
@@ -12,14 +18,13 @@
 
 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>
--- a/lisp/pcvs.el	Wed Jul 25 04:50:21 2007 +0000
+++ b/lisp/pcvs.el	Wed Jul 25 04:50:33 2007 +0000
@@ -392,17 +392,20 @@
     (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)))