# HG changeset patch # User Stefan Monnier # Date 1185339033 0 # Node ID be7fbb40c8513607c4e09f9f595513ee8f4c8984 # Parent 241961c1ec37853ff4f517a3d4eb2cac59ff140c (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. diff -r 241961c1ec37 -r be7fbb40c851 lisp/ChangeLog --- 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 + + * 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 * ps-print.el: Problem with foreground and background color when @@ -12,14 +18,13 @@ 2007-07-24 Dan Nicolaescu - * 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 - * 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 diff -r 241961c1ec37 -r be7fbb40c851 lisp/pcvs.el --- 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)))