summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-07-25 04:50:33 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-07-25 04:50:33 +0000
commit405b8717906649b7ea07d13595627af159b1a330 (patch)
tree1c11e85b51ef3077a9a4d4c4d79fd0e76c83ae2a
parentb4aa60262c04e987eac02418262939cdefb8b7dc (diff)
downloademacs-405b8717906649b7ea07d13595627af159b1a330.tar.gz
(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.
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/pcvs.el13
2 files changed, 18 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1bf1dd1464f..8b3a50d83c3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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>
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index c2f7cb79102..901110bbfa3 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -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)))