Fix #1694: wrong-type-arg stringp errors on some files

This commit is contained in:
Henrik Lissner
2019-08-21 21:17:42 -04:00
parent 970a31fc56
commit 8f1de7c998

View File

@ -118,7 +118,7 @@ information.")
"Check if the current buffer is a candidate for file template expansion. It "Check if the current buffer is a candidate for file template expansion. It
must be non-read-only, empty, and there must be a rule in 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 (file-exists-p (buffer-file-name))) (when (and (not (file-exists-p (or (buffer-file-name) "")))
(not buffer-read-only) (not buffer-read-only)
(bobp) (eobp) (bobp) (eobp)
(not (string-match-p "^ *\\*" (buffer-name)))) (not (string-match-p "^ *\\*" (buffer-name))))