patch 9.1.0602: filetype: Prolog detection can be improved
Problem: filetype: Prolog detection can be improved
Solution: update the prolog detection regex
(igna_martinoli)
related: #10835
related: #15206
closes: #15253
Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 24948a2..cb49112 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -2603,6 +2603,44 @@
call assert_equal('prolog', &filetype)
bwipe!
+ " IDL
+ call writefile(['x = findgen(100)/10'], 'Xfile.pro', 'D')
+ split Xfile.pro
+ call assert_equal('idlang', &filetype)
+
+ filetype off
+endfunc
+
+
+func Test_pl_file()
+ filetype on
+
+ "Prolog
+ call writefile([':-module(test/1,'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['% comment'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['/* multiline comment'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['rule(test, 1.7).'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ " Perl
+ call writefile(['%data = (1, 2, 3);'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('perl', &filetype)
+
filetype off
endfunc
diff --git a/src/version.c b/src/version.c
index 5473fe0..5393649 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 602,
+/**/
601,
/**/
600,