[magit] update advice
This commit is contained in:
parent
2427f2b4d1
commit
418596c895
18
init.org
18
init.org
|
@ -2290,20 +2290,14 @@ SLIME opens CLHS links in Firefox, but I'd rather open them in Tor Browser; Tor
|
||||||
("C" . magit-commit))
|
("C" . magit-commit))
|
||||||
:commands magit-status
|
:commands magit-status
|
||||||
:hook
|
:hook
|
||||||
|
(magit-mode . visual-line-mode)
|
||||||
(magit-post-stage . (lambda () (recenter)))
|
(magit-post-stage . (lambda () (recenter)))
|
||||||
:config
|
:config
|
||||||
(defadvice magit-section-toggle
|
(cl-loop for symbol in '(magit-section-toggle
|
||||||
(after magit-section-toggle-recenter activate) (recenter 3))
|
magit-section-forward
|
||||||
(ad-activate 'magit-section-toggle)
|
magit-section-backward)
|
||||||
(defadvice magit-unstage-item
|
do (advice-add symbol :after (lambda () (recenter 3))))
|
||||||
(after magit-unstage-item-move) (next-line))
|
(advice-add 'magit-unstage-item :after (next-line)))
|
||||||
(ad-activate 'magit-unstage-item)
|
|
||||||
(defadvice magit-goto-next-section
|
|
||||||
(after magit-next-section-recenter activate) (recenter 3))
|
|
||||||
(ad-activate 'magit-goto-next-section)
|
|
||||||
(defadvice magit-goto-previous-section
|
|
||||||
(after magit-previous-section-recenter activate) (recenter 3))
|
|
||||||
(ad-activate 'magit-goto-previous-section))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package git-commit
|
(use-package git-commit
|
||||||
|
|
Loading…
Reference in New Issue