Merge pull request #2614 from tylerware/fix/file-templates/when-function-ignored

Fix file template :when logic to apply to modes
This commit is contained in:
Henrik Lissner 2020-02-26 12:58:25 -05:00 committed by GitHub
commit ac0385685d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,10 +122,10 @@ information.")
(eq major-mode pred))
(and (stringp pred)
(stringp buffer-file-name)
(string-match-p pred buffer-file-name)
(or (not (plist-member plist :when))
(funcall (plist-get plist :when)
buffer-file-name))))
(string-match-p pred buffer-file-name)))
(or (not (plist-member plist :when))
(funcall (plist-get plist :when)
buffer-file-name))
rule)))
(defun +file-templates-check-h ()