summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-07-01 23:33:11 -0400
committerKyle Meyer <kyle@kyleam.com>2014-07-01 23:33:11 -0400
commitcdaf04968469d1fad281d74cd42fc84ddcbeab06 (patch)
tree9e3cda134f7d6f1d732ae32fc484718693fa4904 /lisp
parent163f849a5305d93520afc4b8a02d3a0178bc9219 (diff)
downloademacs.d-cdaf04968469d1fad281d74cd42fc84ddcbeab06.tar.gz
Use Magit autoloads
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-git.el33
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index 5affb59..6860744 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -1,8 +1,8 @@
(add-to-list 'load-path "~/src/emacs/git-modes")
(add-to-list 'load-path "~/src/emacs/magit")
-(require 'magit)
-(autoload 'magit-blame-mode "magit-blame" nil t)
+(require 'magit-autoloads)
+(require 'git-modes-autoloads)
(require-package 'git-annex)
(require 'git-annex)
@@ -13,9 +13,6 @@
(key-chord-define-global ",g" 'magit-status)
-(define-key magit-popup-mode-map (kbd "SPC <t>") 'magit-invoke-popup-switch)
-(define-key magit-popup-mode-map (kbd "SPC SPC <t>") 'magit-invoke-popup-option)
-
(defun km/magit-auto-commit ()
"Commit all changes with \"auto\" commit message.
Useful for non-source code repos (e.g., Org mode note files)."
@@ -49,17 +46,6 @@ Useful for non-source code repos (e.g., Org mode note files)."
(magit-run-git "branch" (concat "b/" current-branch))
(user-error "No current branch")))
-(magit-define-popup-action 'magit-commit-popup
- ?u "Auto commit" 'km/magit-auto-commit)
-(magit-define-popup-action 'magit-push-popup
- ?a "Push all" 'km/magit-push-all)
-(magit-define-popup-action 'magit-log-popup
- ?a "All branches" 'km/magit-log-all-branches)
-(magit-define-popup-action 'magit-branch-popup
- ?t "Local tracking" 'km/magit-checkout-local-tracking)
-(magit-define-popup-action 'magit-branch-popup
- ?s "Backup current branch" 'km/magit-backup-branch)
-
;; http://whattheemacsd.com/setup-magit.el-01.html
(defadvice magit-status (around magit-fullscreen activate)
ad-do-it
@@ -73,4 +59,19 @@ Useful for non-source code repos (e.g., Org mode note files)."
(setq vc-follow-symlinks t)
+(after 'magit
+ (define-key magit-popup-mode-map (kbd "SPC <t>") 'magit-invoke-popup-switch)
+ (define-key magit-popup-mode-map (kbd "SPC SPC <t>") 'magit-invoke-popup-option)
+
+ (magit-define-popup-action 'magit-commit-popup
+ ?u "Auto commit" 'km/magit-auto-commit)
+ (magit-define-popup-action 'magit-push-popup
+ ?a "Push all" 'km/magit-push-all)
+ (magit-define-popup-action 'magit-log-popup
+ ?a "All branches" 'km/magit-log-all-branches)
+ (magit-define-popup-action 'magit-branch-popup
+ ?t "Local tracking" 'km/magit-checkout-local-tracking)
+ (magit-define-popup-action 'magit-branch-popup
+ ?s "Backup current branch" 'km/magit-backup-branch))
+
(provide 'init-git)