Massive refactor. Refactor all the things
This commit is contained in:
parent
03514fc09d
commit
f234be68a4
56 changed files with 792 additions and 831 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue