Add & use add-transient-hook! macro
This commit is contained in:
parent
10b4d94627
commit
2d190fe0c5
3 changed files with 15 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue