Replace :yas-minor-mode with set-yas-minor-mode!

This commit is contained in:
Henrik Lissner 2018-06-15 18:03:11 +02:00
parent ab9b8d97bc
commit 4d017ae19e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 18 additions and 14 deletions

View 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))