Mercurial > emacs
diff lisp/pcvs.el @ 83384:08b4dd6a6e87
Merged from miles@gnu.org--gnu-2005 (patch 578-592)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-578
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-579
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-580
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-581
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-582
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-583
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-584
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-585
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-586
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-587
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-588
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-589
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-590
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-591
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-592
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-424
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 12 Oct 2005 16:14:04 +0000 |
parents | 03746d1d1011 |
children | 59b6016b2dc3 aa89c814f853 |
line wrap: on
line diff
--- a/lisp/pcvs.el Sun Oct 09 20:00:17 2005 +0000 +++ b/lisp/pcvs.el Wed Oct 12 16:14:04 2005 +0000 @@ -647,34 +647,38 @@ it is finished." (when (memq (process-status proc) '(signal exit)) (let ((cvs-postproc (process-get proc 'cvs-postprocess)) - (cvs-buf (process-get proc 'cvs-buffer))) + (cvs-buf (process-get proc 'cvs-buffer)) + (procbuf (process-buffer proc))) + (unless (buffer-live-p cvs-buf) (setq cvs-buf nil)) + (unless (buffer-live-p procbuf) (setq procbuf nil)) ;; Since the buffer and mode line will show that the ;; process is dead, we can delete it now. Otherwise it ;; will stay around until M-x list-processes. (process-put proc 'postprocess nil) (delete-process proc) ;; Don't do anything if the main buffer doesn't exist any more. - (when (buffer-live-p cvs-buf) + (when cvs-buf (with-current-buffer cvs-buf (cvs-update-header (process-get proc 'cvs-header) nil) (setq cvs-mode-line-process (symbol-name (process-status proc))) (force-mode-line-update) (when cvs-postproc - (if (null (buffer-live-p (process-buffer proc))) + (if (null procbuf) ;;(set-process-buffer proc nil) (error "cvs' process buffer was killed") - (with-current-buffer (process-buffer proc) - ;; do the postprocessing like parsing and such - (save-excursion (eval cvs-postproc)) - ;; check whether something is left - (unless (get-buffer-process (current-buffer)) - ;; IIRC, we enable undo again once the process is finished - ;; for cases where the output was inserted in *vc-diff* or - ;; in a file-like buffer. --Stef - (buffer-enable-undo) - (with-current-buffer cvs-buffer - (message "CVS process has completed in %s" - (buffer-name)))))))))))) + (with-current-buffer procbuf + ;; Do the postprocessing like parsing and such. + (save-excursion (eval cvs-postproc))))))) + ;; Check whether something is left. + (when (and procbuf (not (get-buffer-process procbuf))) + (with-current-buffer procbuf + ;; IIRC, we enable undo again once the process is finished + ;; for cases where the output was inserted in *vc-diff* or + ;; in a file-like buffer. --Stef + (buffer-enable-undo) + (with-current-buffer (or cvs-buf (current-buffer)) + (message "CVS process has completed in %s" + (buffer-name)))))))) (defun cvs-parse-process (dcd &optional subdir old-fis) "Parse the output of a cvs process.