mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-14 15:46:56 -05:00
Massive refactor. Refactor all the things
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user