]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-status-kill-dir-status-process): Simplify.
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 28 Mar 2008 18:16:09 +0000 (18:16 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 28 Mar 2008 18:16:09 +0000 (18:16 +0000)
(vc-status-refresh): Make sure the buffer is live.

lisp/ChangeLog
lisp/vc.el

index 15c07a27b7dee0bc09f8f90a88aee70d9e761811..df6d515aec5f06ab38df0c3c8252e63a04ba49f0 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-28  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc.el (vc-status-kill-dir-status-process): Simplify.
+       (vc-status-refresh): Make sure the buffer is live.
+
 2008-03-28  Wilson Snyder  <wsnyder@wsnyder.org>
 
        * progmodes/verilog-mode.el (verilog-auto-inout-module):
index c2653d90c745382354306527dd0a080bcea68040..048f665e66e5e3e233df2c286d1f880cd9dace90 100644 (file)
@@ -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)