diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-07-25 04:50:33 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-07-25 04:50:33 +0000 |
commit | 405b8717906649b7ea07d13595627af159b1a330 (patch) | |
tree | 1c11e85b51ef3077a9a4d4c4d79fd0e76c83ae2a /lisp/pcvs.el | |
parent | b4aa60262c04e987eac02418262939cdefb8b7dc (diff) | |
download | emacs-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.
Diffstat (limited to 'lisp/pcvs.el')
-rw-r--r-- | lisp/pcvs.el | 13 |
1 files changed, 8 insertions, 5 deletions
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))) |