Skip to content

Commit 8995c4c

Browse files
rodrigoaguilerabrammool
authored andcommitted
patch 9.0.0427: Drupal theme files are not recognized
Problem: Drupal theme files are not recognized. Solution: Use php filetype for Drupl theme files. Remove trailing spaces. (Rodrigo Aguilera, closes #11096)
1 parent 65258d3 commit 8995c4c

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

runtime/filetype.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ au BufNewFile,BufRead *.or setf openroad
13231323
au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
13241324

13251325
" OpenSCAD
1326-
au BufNewFile,BufRead *.scad setf openscad
1326+
au BufNewFile,BufRead *.scad setf openscad
13271327

13281328
" Oracle config file
13291329
au BufNewFile,BufRead *.ora setf ora
@@ -1398,7 +1398,8 @@ au BufNewFile,BufRead *.pod setf pod
13981398
" Also Phtml (was used for PHP 2 in the past).
13991399
" Also .ctp for Cake template file.
14001400
" Also .phpt for php tests.
1401-
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt setf php
1401+
" Also .theme for Drupal theme files.
1402+
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt,*.theme setf php
14021403

14031404
" PHP config
14041405
au BufNewFile,BufRead php.ini-* setf dosini

src/testdir/test_filetype.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ let s:filename_checks = {
410410
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
411411
\ 'pf': ['pf.conf'],
412412
\ 'pfmain': ['main.cf'],
413-
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt'],
413+
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt', 'file.theme'],
414414
\ 'pike': ['file.pike', 'file.pmod'],
415415
\ 'pilrc': ['file.rcp'],
416416
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
@@ -535,7 +535,7 @@ let s:filename_checks = {
535535
\ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
536536
\ 'stp': ['file.stp'],
537537
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers', 'any/etc/sudoers.d/file'],
538-
\ 'supercollider': ['file.quark'],
538+
\ 'supercollider': ['file.quark'],
539539
\ 'surface': ['file.sface'],
540540
\ 'svelte': ['file.svelte'],
541541
\ 'svg': ['file.svg'],
@@ -1355,7 +1355,7 @@ func Test_mod_file()
13551355
unlet g:filetype_mod
13561356
bwipe!
13571357

1358-
" RAPID header start with a line containing only "%%%",
1358+
" RAPID header start with a line containing only "%%%",
13591359
" but is not always present.
13601360
call writefile(['%%%'], 'modfile.mod')
13611361
split modfile.mod
@@ -1371,7 +1371,7 @@ func Test_mod_file()
13711371
bwipe!
13721372
call delete('modfile.Mod')
13731373

1374-
" RAPID is not case sensitive, embedded spaces, sysmodule,
1374+
" RAPID is not case sensitive, embedded spaces, sysmodule,
13751375
" file starts with empty line(s).
13761376
call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'modfile.MOD')
13771377
split modfile.MOD
@@ -1499,7 +1499,7 @@ func Test_prg_file()
14991499
unlet g:filetype_prg
15001500
bwipe!
15011501

1502-
" RAPID header start with a line containing only "%%%",
1502+
" RAPID header start with a line containing only "%%%",
15031503
" but is not always present.
15041504
call writefile(['%%%'], 'prgfile.prg')
15051505
split prgfile.prg
@@ -1515,7 +1515,7 @@ func Test_prg_file()
15151515
bwipe!
15161516
call delete('prgfile.Prg')
15171517

1518-
" RAPID is not case sensitive, embedded spaces, sysmodule,
1518+
" RAPID is not case sensitive, embedded spaces, sysmodule,
15191519
" file starts with empty line(s).
15201520
call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'prgfile.PRG')
15211521
split prgfile.PRG
@@ -1626,7 +1626,7 @@ func Test_sys_file()
16261626
unlet g:filetype_sys
16271627
bwipe!
16281628

1629-
" RAPID header start with a line containing only "%%%",
1629+
" RAPID header start with a line containing only "%%%",
16301630
" but is not always present.
16311631
call writefile(['%%%'], 'sysfile.sys')
16321632
split sysfile.sys
@@ -1642,7 +1642,7 @@ func Test_sys_file()
16421642
bwipe!
16431643
call delete('sysfile.Sys')
16441644

1645-
" RAPID is not case sensitive, embedded spaces, sysmodule,
1645+
" RAPID is not case sensitive, embedded spaces, sysmodule,
16461646
" file starts with empty line(s).
16471647
call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'sysfile.SYS')
16481648
split sysfile.SYS

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ static char *(features[]) =
703703

704704
static int included_patches[] =
705705
{ /* Add new patch number below this line */
706+
/**/
707+
427,
706708
/**/
707709
426,
708710
/**/

0 commit comments

Comments
 (0)