[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))
|
||||
:commands magit-status
|
||||
:hook
|
||||
(magit-mode . visual-line-mode)
|
||||
(magit-post-stage . (lambda () (recenter)))
|
||||
:config
|
||||
(defadvice magit-section-toggle
|
||||
(after magit-section-toggle-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-section-toggle)
|
||||
(defadvice magit-unstage-item
|
||||
(after magit-unstage-item-move) (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))
|
||||
(cl-loop for symbol in '(magit-section-toggle
|
||||
magit-section-forward
|
||||
magit-section-backward)
|
||||
do (advice-add symbol :after (lambda () (recenter 3))))
|
||||
(advice-add 'magit-unstage-item :after (next-line)))
|
||||
#+END_SRC
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package git-commit
|
||||
|
|
Loading…
Reference in New Issue