From: Dan Nicolaescu Date: Sat, 29 Mar 2008 05:33:06 +0000 (+0000) Subject: (vc-menu-map-filter): Be more careful when finding X-Git-Tag: emacs-pretest-23.0.90~6799 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3d57a2c20d2916f8515a6e334cdc3dca4e12b4e;p=emacs.git (vc-menu-map-filter): Be more careful when finding the current backend. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb8939ad470..94c3ee908ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-03-29 Dan Nicolaescu + + * vc-hooks.el (vc-menu-map-filter): Be more careful when finding + the current backend. + 2008-03-29 Glenn Morris * calendar/calendar.el (diary-file, american-date-diary-pattern) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index c033b6e8fbc..893b16db601 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -1064,8 +1064,12 @@ Used in `find-file-not-found-functions'." (if (and (symbolp orig-binding) (fboundp orig-binding)) (setq orig-binding (indirect-function orig-binding))) (let ((ext-binding - (if vc-mode (vc-call-backend (vc-backend buffer-file-name) - 'extra-menu)))) + (when vc-mode + (vc-call-backend + (if buffer-file-name + (vc-backend buffer-file-name) + (vc-responsible-backend default-directory)) + 'extra-menu)))) ;; Give the VC backend a chance to add menu entries ;; specific for that backend. (if (null ext-binding)