diff options
author | Glenn Morris <rgm@gnu.org> | 2013-02-01 00:44:10 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-02-01 00:44:10 -0800 |
commit | 1f4f0f46bd36f660afd8061061f12dc98cb7f469 (patch) | |
tree | 6b934887d8a2e6a2e48ae181dc62440b63b1302a /lisp/vc | |
parent | 48c828b923a1c8f0b3350be96fcc9ec8a7c21dbc (diff) | |
download | emacs-1f4f0f46bd36f660afd8061061f12dc98cb7f469.tar.gz |
* vc/vc-hooks.el (vc-menu-map): Disable vc-rollback menu item
if the backend is known not to support it.
Diffstat (limited to 'lisp/vc')
-rw-r--r-- | lisp/vc/vc-hooks.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 99436303fa2..541b0c04b0b 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -976,6 +976,10 @@ current, and kill the buffer that visits the link." ")) (bindings--define-key map [undo] '(menu-item "Undo Last Check-In" vc-rollback + :enable (let ((backend (if buffer-file-name + (vc-backend buffer-file-name)))) + (or (not backend) + (vc-find-backend-function backend 'rollback))) :help "Remove the most recent changeset committed to the repository")) (bindings--define-key map [vc-revert] '(menu-item "Revert to Base Version" vc-revert |