mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
add-yas-minor-mode!: fix void-variable: mode error
This commit is contained in:
@ -4,13 +4,10 @@
|
||||
(defun set-yas-minor-mode! (modes)
|
||||
"Register minor MODES (one mode symbol or a list of them) with yasnippet so it
|
||||
can have its own snippets category, if the folder exists."
|
||||
(let ((fn (intern (format "+snippets|register-%s" mode))))
|
||||
(fset fn (lambda ()
|
||||
(make-local-variable 'yas--extra-modes)
|
||||
(dolist (mode (doom-enlist modes))
|
||||
(add-to-list 'yas--extra-modes mode nil #'eq))
|
||||
(yas--load-pending-jits)))
|
||||
(add-hook (intern (format "%s-hook" mode)) fn)))
|
||||
(dolist (mode (doom-enlist modes))
|
||||
(let ((fn (intern (format "+snippets|register-%s" mode))))
|
||||
(fset fn (lambda () (yas-activate-extra-mode mode)))
|
||||
(add-hook (intern (format "%s-hook" mode)) fn))))
|
||||
|
||||
;;;###autoload
|
||||
(def-setting! :yas-minor-mode (mode)
|
||||
|
Reference in New Issue
Block a user