Fix empty list on +file-templates/insert-license

In case yasnippet hasn't loaded text-mode snippets yet.
This commit is contained in:
Henrik Lissner 2020-02-24 19:44:21 -05:00
parent 24282a454e
commit 59b57b7eae
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -100,6 +100,8 @@ evil is loaded and enabled)."
"Insert a license file template into the current file."
(interactive)
(require 'yasnippet)
(unless (gethash 'text-mode yas--tables)
(yas-reload-all t))
(let ((templates
(let (yas-choose-tables-first ; avoid prompts
yas-choose-keys-first)