Permalink
Browse files

Fix vc binding to use prefix map.

  • Loading branch information...
technomancy committed Nov 20, 2008
1 parent f08c78f commit 4fb43212c35e882e345923ef621298de640ff9a3
Showing with 6 additions and 4 deletions.
  1. +6 −4 starter-kit-bindings.el
View
@@ -80,10 +80,12 @@
(global-set-key (kbd "C-x g") 'magit-status)
;; This is a little hacky since VC doesn't support git add internally
-(global-set-key (kbd "C-x v i") '(lambda () (interactive)
- (if (eq 'Git (vc-backend buffer-file-name))
- (shell-command (format "git add %s" buffer-file-name))
- (vc-register))))
+(eval-after-load 'vc
+ (define-key vc-prefix-map "i" '(lambda () (interactive)
+ (if (not (eq 'Git (vc-backend buffer-file-name)))
+ (vc-register)
+ (shell-command (format "git add %s" buffer-file-name))
+ (message "Staged changes.")))))
;; Activate occur easily inside isearch
(define-key isearch-mode-map (kbd "C-o")

0 comments on commit 4fb4321

Please sign in to comment.