unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* VC error
@ 2008-06-03  1:44 Chong Yidong
  2008-06-03  7:56 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Chong Yidong @ 2008-06-03  1:44 UTC (permalink / raw)
  To: emacs-devel

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))
  (let ((ext-binding ...)) (if (null ext-binding) orig-binding (append orig-binding ... ext-binding)))
  vc-dir-menu-map-filter((keymap (open menu-item "Open file" vc-dir-find-file :help "Find the file on the current line") (open-other menu-item "Open in other window" vc-dir-find-file-other-window :help "Find the file on the current line, in another window") (sepopn "--") (mark menu-item "Mark" vc-dir-mark :help "Mark the current file or all files in the region") (unmark menu-item "Unmark" vc-dir-unmark :help "Unmark the current file or all files in the region") (mark-all menu-item "Mark All" vc-dir-mark-all-files :help "Mark all files that are in the same state as the current file\nWith prefix argument mark all files") (unmark-previous menu-item "Unmark previous " vc-dir-unmark-file-up :help "Move to the previous line and unmark the file") (unmark-all menu-item "Unmark All" vc-dir-unmark-all-files :help "Unmark all files that are in the same state as the current file\nWith prefix argument unmark all files") (sepmrk "--") (previous-line menu-item "Previous line" vc-dir-previous-line :help "Go to the previous line") (next-line menu-item "Next line" vc-dir-next-line :help "Go to the next line" :keys "n") (sepmv "--") (refresh menu-item "Refresh" vc-dir-refresh :enable (not ...) :help "Refresh the contents of the directory buffer") (kill menu-item "Kill Update Command" vc-dir-kill-dir-status-process :enable (vc-dir-busy) :help "Kill the command that updates the directory buffer") (quit menu-item "Quit" quit-window :help "Quit") "VC-dir"))
  where-is-internal(vc-dir-find-file (keymap (vc-dir-mode menu-item "VC-dir" (keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... "VC-dir") :filter vc-dir-menu-map-filter)))
  tool-bar-local-item-from-menu(vc-dir-find-file "open" (keymap) (keymap #^[nil nil keymap #^^[3 0 nil nil nil ... nil nil nil nil nil vc-dir-next-directory nil nil nil vc-dir-find-file nil nil nil nil nil nil nil nil nil nil nil nil nil ... nil nil nil nil vc-dir-next-line nil nil nil nil nil nil nil nil nil nil nil nil negative-argument nil nil ...] #^^[1 0 #^^[2 0 #^^[3 0 nil nil nil ... nil nil nil nil nil vc-dir-next-directory nil nil nil vc-dir-find-file nil nil nil nil nil nil nil nil nil nil nil nil nil ... nil nil nil nil vc-dir-next-line nil nil nil nil nil nil nil nil nil nil nil nil negative-argument nil nil ...] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ...] (menu-bar keymap (vc-dir-mode menu-item "VC-dir" ... :filter vc-dir-menu-map-filter)) (mouse-2 . vc-dir-toggle-mark) (down-mouse-3 . vc-dir-menu) (C-up . vc-dir-previous-directory) (C-down . vc-dir-next-directory) (backtab . vc-dir-previous-directory) (remap keymap (self-insert-command . undefined))))
  (let ((map ...)) (tool-bar-local-item-from-menu (quote vc-dir-find-file) "open" map vc-dir-mode-map) (tool-bar-local-item "bookmark_add" (quote vc-dir-toggle-mark) (quote vc-dir-toggle-mark) map :help "Toggle mark on current item") (tool-bar-local-item-from-menu (quote vc-dir-previous-line) "left-arrow" map vc-dir-mode-map :rtl "right-arrow") (tool-bar-local-item-from-menu (quote vc-dir-next-line) "right-arrow" map vc-dir-mode-map :rtl "left-arrow") (tool-bar-local-item-from-menu (quote vc-print-log) "info" map vc-dir-mode-map) (tool-bar-local-item-from-menu (quote vc-dir-refresh) "refresh" map vc-dir-mode-map) (tool-bar-local-item-from-menu (quote nonincremental-search-forward) "search" map) (tool-bar-local-item-from-menu (quote vc-dir-kill-dir-status-process) "cancel" map vc-dir-mode-map) (tool-bar-local-item-from-menu (quote quit-window) "exit" map vc-dir-mode-map) map)
  (defvar vc-dir-tool-bar-map (let (...) (tool-bar-local-item-from-menu ... "open" map vc-dir-mode-map) (tool-bar-local-item "bookmark_add" ... ... map :help "Toggle mark on current item") (tool-bar-local-item-from-menu ... "left-arrow" map vc-dir-mode-map :rtl "right-arrow") (tool-bar-local-item-from-menu ... "right-arrow" map vc-dir-mode-map :rtl "left-arrow") (tool-bar-local-item-from-menu ... "info" map vc-dir-mode-map) (tool-bar-local-item-from-menu ... "refresh" map vc-dir-mode-map) (tool-bar-local-item-from-menu ... "search" map) (tool-bar-local-item-from-menu ... "cancel" map vc-dir-mode-map) (tool-bar-local-item-from-menu ... "exit" map vc-dir-mode-map) map))
  eval-buffer()  ; Reading at buffer position 34316
  eval((eval-buffer))
  eval-expression((eval-buffer) nil)
  call-interactively(eval-expression nil nil)




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: VC error
  2008-06-03  1:44 VC error Chong Yidong
@ 2008-06-03  7:56 ` Stefan Monnier
  2008-06-03 21:18   ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2008-06-03  7:56 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

> 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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: VC error
  2008-06-03  7:56 ` Stefan Monnier
@ 2008-06-03 21:18   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2008-06-03 21:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 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,

Indeed, thanks.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-03 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03  1:44 VC error Chong Yidong
2008-06-03  7:56 ` Stefan Monnier
2008-06-03 21:18   ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).