editor/file-templates: general refactor

This commit is contained in:
Henrik Lissner 2019-06-18 00:23:09 +02:00
parent 21cf1c2da6
commit c0bffd4268
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 23 additions and 22 deletions

View file

@ -114,7 +114,7 @@ must be non-read-only, empty, and there must be a rule in
(when (and (not buffer-read-only)
(bobp) (eobp)
(not (string-match-p "^ *\\*" (buffer-name))))
(when-let* ((rule (cl-find-if #'+file-template-p +file-templates-alist)))
(when-let (rule (cl-find-if #'+file-template-p +file-templates-alist))
(apply #'+file-templates--expand rule))))