Adjust magit
authorJoerg Jaspert <joerg@debian.org>
Fri, 22 Sep 2017 08:24:56 +0000 (10:24 +0200)
committerJoerg Jaspert <joerg@debian.org>
Fri, 22 Sep 2017 08:24:56 +0000 (10:24 +0200)
.emacs.d/config/emacs.org

index 2dbcca9..3f02b09 100644 (file)
@@ -4051,72 +4051,73 @@ CLOSED: [2017-08-26 Sat 14:44]
  [2013-04-21 So 20:48]
  magit is a mode for interacting with git.
  #+BEGIN_SRC emacs-lisp
-   (use-package magit
-     :ensure magit
-     :commands  (magit-log magit-run-gitk magit-run-git-gui magit-status
-                           magit-git-repo-p magit-list-repos)
-     :defer t
-     :bind (("C-x g" . magit-status)
-            ("C-x G" . magit-status-with-prefix)
-            :magit-status-mode-map
-            ("q" . magit-quit-session ))
-      
-     :config
-     (progn
-       (setq magit-repository-directories '("~/devel"
-                                            "~/git/"
-                                            ))
-       (setq magit-repository-directories-depth 4)
-       (setq magit-log-auto-more t)
-
-       (use-package magit-blame
-         :commands magit-blame-mode
-         :defer t)
-
-       (add-hook 'magit-mode-hook 'hl-line-mode)
-       (defun magit-status-with-prefix ()
-         (interactive)
-         (let ((current-prefix-arg '(4)))
-           (call-interactively 'magit-status)))
-       (setenv "GIT_PAGER" "")
-
-       (unbind-key "M-h" magit-mode-map)
-       (unbind-key "M-s" magit-mode-map)
-       (add-to-list 'magit-no-confirm 'stage-all-changes)
-       (setq magit-push-always-verify nil)
-
-       (add-hook 'magit-log-edit-mode-hook
-                 #'(lambda ()
-                     (set-fill-column 72)
-                     (flyspell-mode)))
-
-       (add-hook 'git-rebase-mode-hook
-                 #'(lambda ()
-                     (smartscan-mode 0))
-                 )
-       (defadvice magit-status (around magit-fullscreen activate)
-         (window-configuration-to-register :magit-fullscreen)
-         ad-do-it
-         (delete-other-windows))
-
-       (defun magit-quit-session ()
-         "Restores the previous window configuration and kills the magit buffer"
-         (interactive)
-         (kill-buffer)
-         (jump-to-register :magit-fullscreen))
-
-       (defun magit-rebase-unpushed (commit &optional args)
-         "Start an interactive rebase sequence over all unpushed commits."
-         (interactive (list (magit-get-tracked-branch)
-                            (magit-rebase-arguments)))
-         (if (setq commit (magit-rebase-interactive-assert commit))
-             (magit-run-git-sequencer "rebase" "-i" commit args)
-           (magit-log-select
-            `(lambda (commit)
-               (magit-rebase-interactive (concat commit "^") (list ,@args))))))
-
-       (magit-define-popup-action 'magit-rebase-popup ?l "Rebase unpushed" 'magit-rebase-unpushed)
-       ))
+ (use-package magit
+   :ensure magit
+   :commands  (magit-log magit-run-gitk magit-run-git-gui magit-status
+                         magit-git-repo-p magit-list-repos)
+   :bind (("C-x g" . magit-status)
+          ("C-x G" . magit-status-with-prefix)
+          :magit-status-mode-map
+          ("q" . magit-quit-session ))
+
+   :config
+   (progn
+     (setq magit-repository-directories '("~/devel"
+                                          "~/git/"
+                                          ))
+     (setq magit-repository-directories-depth 4)
+     (setq magit-log-auto-more t)
+
+     ; VC shouldnt do anything with git
+     (setq vc-handled-backends (delq 'Git vc-handled-backends))
+
+     (use-package magit-blame
+       :commands magit-blame-mode)
+
+     (add-hook 'magit-mode-hook 'hl-line-mode)
+     (defun magit-status-with-prefix ()
+       (interactive)
+       (let ((current-prefix-arg '(4)))
+         (call-interactively 'magit-status)))
+     (setenv "GIT_PAGER" "")
+
+     (unbind-key "M-h" magit-mode-map)
+     (unbind-key "M-s" magit-mode-map)
+     (add-to-list 'magit-no-confirm 'stage-all-changes)
+     (setq magit-push-always-verify nil)
+
+     (add-hook 'magit-log-edit-mode-hook
+               #'(lambda ()
+                   (set-fill-column 72)
+                   (flyspell-mode)))
+
+     (add-hook 'git-rebase-mode-hook
+               #'(lambda ()
+                   (smartscan-mode 0))
+               )
+     (defadvice magit-status (around magit-fullscreen activate)
+       (window-configuration-to-register :magit-fullscreen)
+       ad-do-it
+       (delete-other-windows))
+
+     (defun magit-quit-session ()
+       "Restores the previous window configuration and kills the magit buffer"
+       (interactive)
+       (kill-buffer)
+       (jump-to-register :magit-fullscreen))
+
+     (defun magit-rebase-unpushed (commit &optional args)
+       "Start an interactive rebase sequence over all unpushed commits."
+       (interactive (list (magit-get-tracked-branch)
+                          (magit-rebase-arguments)))
+       (if (setq commit (magit-rebase-interactive-assert commit))
+           (magit-run-git-sequencer "rebase" "-i" commit args)
+         (magit-log-select
+          `(lambda (commit)
+             (magit-rebase-interactive (concat commit "^") (list ,@args))))))
+
+     (magit-define-popup-action 'magit-rebase-popup ?l "Rebase unpushed" 'magit-rebase-unpushed)
+     ))
  #+END_SRC
 ** markdown-mode
  [2014-05-20 Tue 23:04]