patch 9.1.0773: filetype: some Apache files are not recognized
Commit:
https://github.com/vim/vim/commit/e58e9015cc431b79d88af4daec838519a8e296d6
Author: nisbet-hubbard <[email protected]>
Date: Thu Oct 10 19:09:28 2024 +0200
patch 9.1.0773: filetype: some Apache files are not recognized
Problem: filetype: some Apache files are not recognized
Solution: Detect more config files from the Apache source
distribution as filetype apache (nisbet-hubbard)
closes: #15810
Signed-off-by: nisbet-hubbard
<[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 4b5577acb..676994f78 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2959,7 +2959,7 @@ au BufNewFile,BufRead
*/etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSe
au BufNewFile,BufRead proftpd.conf* call
s:StarSetf('apachestyle')
" More Apache config files
-au BufNewFile,BufRead
access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call
s:StarSetf('apache')
+au BufNewFile,BufRead
access.conf*,apache.conf*,apache2.conf*,httpd.conf*,httpd-*.conf*,srm.conf*,proxy-html.conf*
call s:StarSetf('apache')
au BufNewFile,BufRead
*/etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.*/*,*/etc/httpd/mods-*/*,*/etc/httpd/sites-*/*,*/etc/httpd/conf.d/*.conf*
call s:StarSetf('apache')
" APT config file
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index bd79fbb78..74167cb5f 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -96,8 +96,17 @@ def s:GetFilenameChecks(): dict<list<string>>
ampl: ['file.run'],
ant: ['build.xml'],
antlr4: ['parser.g4'],
- apache: ['.htaccess', '/etc/httpd/file.conf',
'/etc/apache2/sites-2/file.com', '/etc/apache2/some.config',
'/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file',
'/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config',
'/etc/apache2/conf.file/file', '/etc/apache2/file.conf',
'/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file',
'/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com',
'/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file',
'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file',
'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file',
'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file',
'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf',
'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf',
'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file',
'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file',
'/etc/httpd/mods-some/file', '/etc/httpd/sites-some/file',
'/etc/httpd/conf.file/conf'],
- apachestyle: ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file',
'/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf',
'/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file',
'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf',
'proftpd.conf-file'],
+ apache: ['.htaccess', '/etc/httpd/file.conf',
'/etc/apache2/sites-2/file.com', '/etc/apache2/some.config',
'/etc/apache2/conf.file/conf',
+ '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file',
'/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file',
'/etc/apache2/file.conf',
+ '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file',
'/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com',
+ '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file',
'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file',
+ 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file',
'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file',
+ 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf',
'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf',
+ 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file',
'httpd.conf', 'httpd.conf-file', 'httpd-some.conf',
+ 'httpd-some.conf-file', 'srm.conf', 'srm.conf-file', 'proxy-html.conf',
'proxy-html.conf-file', '/etc/httpd/mods-some/file',
+ '/etc/httpd/sites-some/file', '/etc/httpd/conf.file/conf'],
+ apachestyle: ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file',
'/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf',
'/etc/proftpd/file.conf-file',
+ 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf',
'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'],
applescript: ['file.scpt'],
aptconf: ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
arch: ['.arch-inventory', '=tagging-method'],
diff --git a/src/version.c b/src/version.c
index 37c733233..905daf90d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 773,
/**/
772,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1sywkp-007vB2-0g%40256bit.org.