diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2008-03-28 18:16:09 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2008-03-28 18:16:09 +0000 |
commit | f56d71a5961e6b6ccc5108ee624d6292d562661d (patch) | |
tree | 5107258325990e432a075191aff730a0a7ce90db /lisp/vc.el | |
parent | 4c92f4298ed4022aed7ca782076b22c9be96f605 (diff) | |
download | emacs-f56d71a5961e6b6ccc5108ee624d6292d562661d.tar.gz |
(vc-status-kill-dir-status-process): Simplify.
(vc-status-refresh): Make sure the buffer is live.
Diffstat (limited to 'lisp/vc.el')
-rw-r--r-- | lisp/vc.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index c2653d90c74..048f665e66e 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -2981,16 +2981,16 @@ Throw an error if another update process is in progress." ;; be asynchronous. It should compute the results and call the ;; function passed as a an arg to update the vc-status buffer with ;; the results. - (setq vc-status-process-buffer - (vc-call-backend - backend 'dir-status default-directory - #'vc-update-vc-status-buffer (current-buffer)))))) + (let ((buf (vc-call-backend + backend 'dir-status default-directory + #'vc-update-vc-status-buffer (current-buffer)))) + (setq vc-status-process-buffer + (if (buffer-live-p buf) buf nil)))))) (defun vc-status-kill-dir-status-process () "Kill the temporary buffer and associated process." (interactive) - (when (and (bufferp vc-status-process-buffer) - (buffer-live-p vc-status-process-buffer)) + (when (buffer-live-p vc-status-process-buffer) (let ((proc (get-buffer-process vc-status-process-buffer))) (when proc (delete-process proc)) (setq vc-status-process-buffer nil) |