patch 9.1.0616: filetype: Make syntax highlighting off for MS Makefiles
Problem: filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
(Ken Takata)
Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
https://github.com/vim/vim/blob/2979cfc2627d76a9c09cad46a1647dcd4aa73f5f/src/Make_mvc.mak#L1331
Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.
Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test
closes: #15341
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ken Takata <kentkt@csc.jp>
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index cee7c21..f8b3ea8 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -2646,4 +2646,21 @@
filetype off
endfunc
+func Test_make_file()
+ filetype on
+
+ " Microsoft Makefile
+ call writefile(['# Makefile for Windows', '!if "$(VIMDLL)" == "yes"'], 'XMakefile.mak', 'D')
+ split XMakefile.mak
+ call assert_equal(1, get(b:, 'make_microsoft', 0))
+ bwipe!
+
+ call writefile(['# get the list of tests', 'include testdir/Make_all.mak'], 'XMakefile.mak', 'D')
+ split XMakefile.mak
+ call assert_equal(0, get(b:, 'make_microsoft', 0))
+ bwipe!
+
+ filetype off
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index f434a13..9ee1592 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 616,
+/**/
615,
/**/
614,