[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VC error

From: Stefan Monnier
Subject: Re: VC error
Date: Tue, 03 Jun 2008 03:56:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> I've been getting (void-variable vc-client-mode) errors whenever I try
> using VC operation with debug-on-error set to non-nil.

> Anyone else seen this?

> One way to reproduce this is simply:

> emacs -Q
> C-x C-f emacs/lisp/vc-dispatcher.el
> M-: (eval-buffer) RET

> Debugger entered--Lisp error: (void-variable vc-client-mode)
>   (vc-client-object->extra-menu vc-client-mode)
>   (funcall (vc-client-object->extra-menu vc-client-mode))

Hopefully, I've just fixed this,


--- vc-dispatcher.el.~1.58.~    2008-05-27 10:05:20.000000000 -0400
+++ vc-dispatcher.el    2008-06-03 03:55:24.000000000 -0400
@@ -760,7 +760,10 @@
   (when (and (symbolp orig-binding) (fboundp orig-binding))
     (setq orig-binding (indirect-function orig-binding)))
   (let ((ext-binding
-        (funcall (vc-client-object->extra-menu vc-client-mode))))
+         ;; This may be executed at load-time for tool-bar-local-item-from-menu
+         ;; but at that time vc-client-mode is not known (or even bound) yet.
+         (when (and (boundp 'vc-client-mode) vc-client-mode)
+           (funcall (vc-client-object->extra-menu vc-client-mode)))))
     (if (null ext-binding)
       (append orig-binding

reply via email to

[Prev in Thread] Current Thread [Next in Thread]