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:
commit
ac0385685d
1 changed files with 4 additions and 4 deletions
|
@ -122,10 +122,10 @@ information.")
|
||||||
(eq major-mode pred))
|
(eq major-mode pred))
|
||||||
(and (stringp pred)
|
(and (stringp pred)
|
||||||
(stringp buffer-file-name)
|
(stringp buffer-file-name)
|
||||||
(string-match-p pred buffer-file-name)
|
(string-match-p pred buffer-file-name)))
|
||||||
(or (not (plist-member plist :when))
|
(or (not (plist-member plist :when))
|
||||||
(funcall (plist-get plist :when)
|
(funcall (plist-get plist :when)
|
||||||
buffer-file-name))))
|
buffer-file-name))
|
||||||
rule)))
|
rule)))
|
||||||
|
|
||||||
(defun +file-templates-check-h ()
|
(defun +file-templates-check-h ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue