From 8d27bcdf2e758dc6a4868c8fdee65b9a93101b67 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 3 Jun 2008 07:56:02 +0000 Subject: [PATCH] (vc-dir-menu-map-filter): Don't fail if vc-client-mode is not set. --- lisp/ChangeLog | 3 +++ lisp/vc-dispatcher.el | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 63496779e63..ec5be377aa7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-06-03 Stefan Monnier + * vc-dispatcher.el (vc-dir-menu-map-filter): Don't fail if + vc-client-mode is not set. + * image-mode.el (image-mode-map): Suppress key map and bind `q'. * doc-view.el (doc-view-mode-map): Inherit from image-mode-map. diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el index f62b3b0744f..dd4d20314ed 100644 --- a/lisp/vc-dispatcher.el +++ b/lisp/vc-dispatcher.el @@ -760,7 +760,10 @@ See `run-hooks'." (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 -- 2.39.2