(vc-dir-menu-map-filter): Don't fail if vc-client-mode is not set.

This commit is contained in:
Stefan Monnier 2008-06-03 07:56:02 +00:00
parent e914c409be
commit 8d27bcdf2e
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2008-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
* 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.

View file

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