Merge pull request #936 from amosbird/patch-7

Rule is too restrict for file templates
This commit is contained in:
Henrik Lissner 2018-10-06 23:41:24 -04:00 committed by GitHub
commit f325275607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,6 @@ must be non-read-only, empty, and there must be a rule in
`+file-templates-alist' that applies to it." `+file-templates-alist' that applies to it."
(when (and (not buffer-read-only) (when (and (not buffer-read-only)
(bobp) (eobp) (bobp) (eobp)
(get-buffer-window)
(not (string-match-p "^ *\\*" (buffer-name)))) (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)))) (apply #'+file-templates--expand rule))))