Replace :yas-minor-mode with set-yas-minor-mode!
This commit is contained in:
parent
ab9b8d97bc
commit
4d017ae19e
5 changed files with 18 additions and 14 deletions
15
modules/feature/snippets/autoload/settings.el
Normal file
15
modules/feature/snippets/autoload/settings.el
Normal file
|
@ -0,0 +1,15 @@
|
|||
;;; feature/snippets/autoload/settings.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autodef
|
||||
(defun set-yas-minor-mode! (mode)
|
||||
"Register a minor MODE with yasnippet so it can have its own snippets
|
||||
category, if the folder exists."
|
||||
(after! yasnippet
|
||||
(let ((fn (intern (format "+snippets--register-%s" mode))))
|
||||
(fset fn (lambda () (+snippets|enable-project-modes mode)))
|
||||
(add-hook (intern (format "%s-hook" mode)) fn))))
|
||||
|
||||
;;;###autoload
|
||||
(def-setting! :yas-minor-mode (mode)
|
||||
:obsolete set-yas-minor-mode!
|
||||
`(set-yas-minor-mode! ,mode))
|
Loading…
Add table
Add a link
Reference in a new issue