Fix add-yas-minor-mode!
This commit is contained in:
parent
ac838e2a74
commit
6e4cadd261
1 changed files with 6 additions and 7 deletions
|
@ -2,16 +2,15 @@
|
|||
;; for ../core-yasnippet.el
|
||||
|
||||
;;;###autoload
|
||||
(defmacro add-yas-minor-mode! (&rest modes)
|
||||
(defmacro add-yas-minor-mode! (mode)
|
||||
"Register minor MODES in yasnippet."
|
||||
`(after! yasnippet
|
||||
(when (boundp 'yas-extra-modes)
|
||||
,@(mapcar (lambda (mode)
|
||||
`(after! ,(cadr mode)
|
||||
(add-hook ',(intern (concat (symbol-name (cadr mode)) "-hook"))
|
||||
(lambda ()
|
||||
(if (symbol-value ,mode)
|
||||
(yas-activate-extra-mode ,mode)
|
||||
(setq yas-extra-modes (delq ,mode yas-extra-modes)))))
|
||||
modes))))
|
||||
(yas-deactivate-extra-mode ,mode)))))))
|
||||
|
||||
(provide 'macros-yasnippet)
|
||||
;;; macros-yasnippet.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue