From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: VC error Date: Tue, 03 Jun 2008 03:56:28 -0400 Message-ID: References: <874p8b8f86.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212479939 13770 80.91.229.12 (3 Jun 2008 07:58:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2008 07:58:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 03 09:59:41 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K3RPq-0000AK-5r for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2008 09:58:46 +0200 Original-Received: from localhost ([127.0.0.1]:53599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3RP4-0008PT-0L for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2008 03:57:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3RNl-0007Rf-7W for emacs-devel@gnu.org; Tue, 03 Jun 2008 03:56:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3RNj-0007Qh-JY for emacs-devel@gnu.org; Tue, 03 Jun 2008 03:56:36 -0400 Original-Received: from [199.232.76.173] (port=56631 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3RNj-0007Qc-DJ for emacs-devel@gnu.org; Tue, 03 Jun 2008 03:56:35 -0400 Original-Received: from 206-248-132-168.dsl.teksavvy.com ([206.248.132.168]:33161 helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3RNi-0005yI-RK for emacs-devel@gnu.org; Tue, 03 Jun 2008 03:56:35 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id A3B59B423C; Tue, 3 Jun 2008 03:56:28 -0400 (EDT) In-Reply-To: <874p8b8f86.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 02 Jun 2008 21:44:09 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98284 Archived-At: > 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, Stefan --- 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) orig-binding (append orig-binding