# HG changeset patch # User Stefan Monnier # Date 1053718262 0 # Node ID ae05e83c45d5652e358622c25abe061d4a5a198a # Parent 844fe4ab9b6cb2f2044fc920f406707522c0d74a (cvs-temp-buffer): Kill running process in displayed buffers. (cvs-make-cvs-buffer): Fix up format of the header. diff -r 844fe4ab9b6c -r ae05e83c45d5 lisp/pcvs.el --- a/lisp/pcvs.el Fri May 23 18:51:34 2003 +0000 +++ b/lisp/pcvs.el Fri May 23 19:31:02 2003 +0000 @@ -369,7 +369,14 @@ (let ((proc (get-buffer-process buf))) (when (and (not normal) (processp proc) (memq (process-status proc) '(run stop))) - (error "Can not run two cvs processes simultaneously"))) + (if cmd + ;; When CMD is specified, the buffer is normally shown to the + ;; user, so interrupting the process is not harmful. + ;; Use `delete-process' rather than `kill-process' otherwise + ;; the pending output of the process will still get inserted + ;; after we erase the buffer. + (delete-process proc) + (error "Can not run two cvs processes simultaneously")))) (if (not name) (kill-local-variable 'other-window-scroll-buffer) ;; Strangely, if no window is created, `display-buffer' ends up @@ -454,7 +461,8 @@ (concat "\nTag : " (substring tag 1))) ((string-match "\\`D" tag) (concat "\nDate : " (substring tag 1))) - (""))))) + ("\n")))) + "\n") (setq buffer-read-only t) (cvs-mode) (set (make-local-variable 'list-buffers-directory) buffer-name)