summaryrefslogtreecommitdiffstats
path: root/ravi-init-vc.el
diff options
context:
space:
mode:
Diffstat (limited to 'ravi-init-vc.el')
-rw-r--r--ravi-init-vc.el51
1 files changed, 28 insertions, 23 deletions
diff --git a/ravi-init-vc.el b/ravi-init-vc.el
index 3f63bfd..28953f6 100644
--- a/ravi-init-vc.el
+++ b/ravi-init-vc.el
@@ -1,6 +1,6 @@
;;; ravi-init-vc.el --- vc control
-;; Copyright (C) 2013
+;; Copyright (C) 2013
;; Author: <ravi@nero.lan>
;; Keywords: vc
@@ -41,18 +41,23 @@
:bind ("C-x v f" . vc-git-grep)
:config
(progn
- (global-magit-wip-save-mode)
- (diminish 'magit-wip-save-mode)
- )
+ (global-magit-wip-save-mode)
+ (diminish 'magit-wip-save-mode)
+ )
)
- (after-load 'magit-key-mode
- (require 'magit-svn))
-
+ ;(after-load 'magit-key-mode
+ ; (require 'magit-svn))
+
(after-load 'compile
- (dolist (defn (list '(git-svn-updated "^\t[A-Z]\t\\(.*\\)$" 1 nil nil 0 1)
- '(git-svn-needs-update "^\\(.*\\): needs update$" 1 nil nil 2 1)))
- (add-to-list 'compilation-error-regexp-alist-alist defn)
- (add-to-list 'compilation-error-regexp-alist (car defn))))
+ (dolist (defn (list '(git-svn-updated "^\t[A-Z]\t\\(.*\\)$" 1 nil nil 0 1)
+ '(git-svn-needs-update "^\\(.*\\): needs update$" 1 nil nil 2 1)))
+ (add-to-list 'compilation-error-regexp-alist-alist defn)
+ (add-to-list 'compilation-error-regexp-alist (car defn))))
+
+ (use-package magit-svn
+ :config (add-hook 'magit-mode-hook 'turn-on-magit-svn)
+ :ensure t
+ )
(defvar git-svn--available-commands nil "Cached list of git svn subcommands")
@@ -60,22 +65,22 @@
"Run a git svn subcommand in DIR."
(interactive "DSelect directory: ")
(unless git-svn--available-commands
- (setq git-svn--available-commands
- (sanityinc/string-all-matches
- "^ \\([a-z\\-]+\\) +"
- (shell-command-to-string "git svn help") 1)))
+ (setq git-svn--available-commands
+ (sanityinc/string-all-matches
+ "^ \\([a-z\\-]+\\) +"
+ (shell-command-to-string "git svn help") 1)))
(let* ((default-directory (vc-git-root dir))
- (compilation-buffer-name-function (lambda (major-mode-name) "*git-svn*")))
- (compile (concat "git svn "
- (ido-completing-read "git-svn command: "
- git-svn--available-commands nil t))))
+ (compilation-buffer-name-function (lambda (major-mode-name) "*git-svn*")))
+ (compile (concat "git svn "
+ (ido-completing-read "git-svn command: "
+ git-svn--available-commands nil t))))
)
(defun magit-toggle-whitespace ()
(interactive)
(if (member "-w" magit-diff-options)
- (magit-dont-ignore-whitespace)
- (magit-ignore-whitespace)))
+ (magit-dont-ignore-whitespace)
+ (magit-ignore-whitespace)))
(defun magit-ignore-whitespace ()
(interactive)
@@ -92,8 +97,8 @@
(defun magit-just-amend ()
(interactive)
(save-window-excursion
- (magit-with-refresh
- (shell-command "git --no-pager commit --amend --reuse-message=HEAD"))))
+ (magit-with-refresh
+ (shell-command "git --no-pager commit --amend --reuse-message=HEAD"))))
(bind-key "C-a" 'magit-just-amend magit-status-mode-map)
)