Add & use add-transient-hook! macro

This commit is contained in:
Henrik Lissner 2017-03-02 01:43:00 -05:00
parent 10b4d94627
commit 2d190fe0c5
3 changed files with 15 additions and 7 deletions

View file

@ -13,10 +13,7 @@
:init
;; Ensure `yas-reload-all' is called as late as possible. Other modules could
;; have additional configuration for yasnippet. For example, file-templates.
(add-hook 'yas-minor-mode-hook '+snippets|load)
(defun +snippets|load (&rest _)
(yas-reload-all)
(remove-hook 'yas-minor-mode-hook '+snippets|load))
(add-transient-hook! yas-minor-mode-hook (yas-reload-all))
(add-hook! (text-mode prog-mode snippet-mode markdown-mode org-mode)
'yas-minor-mode-on)