# HG changeset patch # User Eric S. Raymond # Date 1209943489 0 # Node ID 070ce953fab4f7ebc19ce037b7fa04105d873423 # Parent cc6aa752e662c3c65a749a04f807b88362a83621 Correct buggy dispatch logic. diff -r cc6aa752e662 -r 070ce953fab4 lisp/vc.el --- a/lisp/vc.el Sun May 04 23:20:35 2008 +0000 +++ b/lisp/vc.el Sun May 04 23:24:49 2008 +0000 @@ -2180,8 +2180,9 @@ ;; FIXME: Replace these with a more efficient dispatch (defun vc-generic-status-printer (fileentry) - (let ((backend (vc-responsible-backend (vc-dir-fileinfo->name fileentry)))) - (vc-call-backend backend 'status-printer fileentry))) + (let* ((file (vc-dir-fileinfo->name fileentry)) + ((backend (vc-responsible-backend file)))) + (vc-call-backend backend 'status-printer file))) (defun vc-generic-state (file) (let ((backend (vc-responsible-backend file))) @@ -2196,6 +2197,7 @@ (vc-dir-headers backend dir))) (defun vc-make-backend-object (file-or-dir) + "Create the backend capability object needed by vc-dispatcher." (vc-create-client-object "VC status" (let ((backend (vc-responsible-backend file-or-dir))) @@ -2210,7 +2212,7 @@ "Show the VC status for DIR." (interactive "DVC status for directory: ") (pop-to-buffer (vc-dir-prepare-status-buffer dir)) - (if (eq major-mode 'vc-dir-mode) + (if (and (eq major-mode 'vc-dir-mode) (boundp 'client-object)) (vc-dir-refresh) ;; Otherwise, initialize a new view using the dispatcher layer (progn