Mercurial > emacs
diff lisp/pcvs.el @ 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 | 9355f9b7bbff |
children | 651c50f01f5f c17afaa92484 f55f9811f5d7 |
line wrap: on
line diff
--- 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)))