Adjust magit
authorJoerg Jaspert <joerg@debian.org>
Wed, 26 Dec 2018 13:43:48 +0000 (14:43 +0100)
committerJoerg Jaspert <joerg@debian.org>
Wed, 26 Dec 2018 13:43:48 +0000 (14:43 +0100)
.emacs.d/config/emacs.org

index 93329b9..1f877a4 100644 (file)
@@ -4093,74 +4093,80 @@ 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)
-   :bind (("C-x g" . magit-status)
-          ("C-x G" . magit-status-with-prefix)
-          :map magit-status-mode-map
-          ("q" . magit-quit-session ))
 (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)
+           :map 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)
+    :config
+    (progn
+      (setq magit-repository-directories '(("~/devel" . 4)
+                                           ("~/git/" . 4)
+                                           ))
+      (setq magit-log-auto-more t)
       (setq magit-completing-read-function 'ivy-completing-read)
 
-     ; VC shouldnt do anything with git
-     (setq vc-handled-backends (delq 'Git vc-handled-backends))
+      ; VC shouldnt do anything with git
+      (setq vc-handled-backends (delq 'Git vc-handled-backends))
 
-     (use-package magit-blame
-       :commands magit-blame-mode)
+      (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)
-     ))
+      (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 forge
+       :ensure t
+       :config
+       (progn
+         (setq gitlab.salsa.debian.org.user "joerg")
+         ))
+      ))
  #+END_SRC
 ** markdown-mode
  [2014-05-20 Tue 23:04]