Replace lambda with named function in gitter refresh fix

Hooks should not include anonymous functions therefore
I have replaced it with a named function.

https://github.com/bbatsov/emacs-lisp-style-guide
This commit is contained in:
Maximilian Wolff 2020-09-18 20:22:27 +02:00
parent c23b17833c
commit 1f869031ab
No known key found for this signature in database
GPG key ID: 2DD07025BFDBD89A

View file

@ -205,9 +205,9 @@
(progn
;; If you enable global minor mode
(when version-control-global-margin
(add-hook 'magit-pre-refresh-hook
(lambda ()
(git-gutter+-in-all-buffers (git-gutter+-refresh))))
(defun spacemacs//git-gutter+-refresh-in-all-buffers ()
(git-gutter+-in-all-buffers (git-gutter+-refresh)))
(add-hook 'magit-pre-refresh-hook #'spacemacs//git-gutter+-refresh-in-all-buffers)
(run-with-idle-timer 1 nil 'global-git-gutter+-mode))
(setq
git-gutter+-modified-sign " "