Massive refactor. Refactor all the things

This commit is contained in:
Henrik Lissner 2016-04-23 22:08:46 -04:00
parent 03514fc09d
commit f234be68a4
56 changed files with 792 additions and 831 deletions

View file

@ -2,15 +2,14 @@
;; for ../core-yasnippet.el
;;;###autoload
(defmacro add-yas-minor-mode! (mode)
(defmacro def-yas-mode! (mode)
"Register minor MODES in yasnippet."
`(after! yasnippet
(when (boundp 'yas--extra-modes)
(add-hook ',(intern (concat (symbol-name (cadr mode)) "-hook"))
(lambda ()
(if (symbol-value ,mode)
(yas-activate-extra-mode ,mode)
(yas-deactivate-extra-mode ,mode)))))))
(add-hook! ,mode
(if (symbol-value ,mode)
(yas-activate-extra-mode ,mode)
(yas-deactivate-extra-mode ,mode))))))
(provide 'macros-yasnippet)
;;; macros-yasnippet.el ends here