patch 9.1.0958: filetype: supertux2 config files detected as lisp
Commit:
https://github.com/vim/vim/commit/e62d93ead10b4c5818e3c0b7551f1784d24bfe33
Author: Wu, Zhenyu <[email protected]>
Date: Tue Dec 24 09:54:27 2024 +0100
patch 9.1.0958: filetype: supertux2 config files detected as lisp
Problem: filetype: supertux2 config files detected as lisp
Solution: detect supertux2 config files as scheme instead
(Wu, Zhenyu)
References:
https://github.com/SuperTux/supertux/wiki/S-Expression
supertux uses #t and #f as bool type, which is same as scheme, not
common lisp
closes: #16287
Signed-off-by: Wu, Zhenyu <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 8b3d44db5..3eb173646 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1384,9 +1384,9 @@ au BufNewFile,BufRead *.ly,*.ily setf lilypond
" Lisp (*.el = ELisp)
" *.jl was removed, it's also used for Julia, better skip than guess wrong.
if has("fname_case")
- au BufNewFile,BufRead
*.lsp,*.lisp,*.asd,*.el,*.L,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf
lisp
+ au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.L,.emacs,.sawfishrc setf lisp
else
- au BufNewFile,BufRead
*.lsp,*.lisp,*.asd,*.el,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp
+ au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,.emacs,.sawfishrc setf lisp
endif
" *.cl = Common Lisp or OpenCL
@@ -2314,8 +2314,8 @@ au BufNewFile,BufRead *.zsh,*.zsh-theme,*.zunit
setf zsh
" Salt state files
au BufNewFile,BufRead *.sls setf salt
-" Scheme ("racket" patterns are now separate, see above)
-au BufNewFile,BufRead *.scm,*.ss,*.sld setf scheme
+" Scheme, Supertux configuration ("racket" patterns are now separate, see
above)
+au BufNewFile,BufRead *.scm,*.ss,*.sld,*.stsg,*/supertux2/config setf
scheme
" Screen RC
au BufNewFile,BufRead .screenrc,screenrc setf screen
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index b5e2dc0b1..20a11ae43 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -429,7 +429,7 @@ def s:GetFilenameChecks(): dict<list<string>>
limits: ['/etc/limits', '/etc/anylimits.conf',
'/etc/anylimits.d/file.conf', '/etc/limits.conf', '/etc/limits.d/file.conf',
'/etc/some-limits.conf', '/etc/some-limits.d/file.conf', 'any/etc/limits',
'any/etc/limits.conf', 'any/etc/limits.d/file.conf',
'any/etc/some-limits.conf', 'any/etc/some-limits.d/file.conf'],
liquidsoap: ['file.liq'],
liquid: ['file.liquid'],
- lisp: ['file.lsp', 'file.lisp', 'file.asd', 'file.el', '.emacs',
'.sawfishrc', 'sbclrc', '.sbclrc', 'file.stsg',
'any/local/share/supertux2/config'],
+ lisp: ['file.lsp', 'file.lisp', 'file.asd', 'file.el', '.emacs',
'.sawfishrc', 'sbclrc', '.sbclrc'],
lite: ['file.lite', 'file.lt'],
litestep: ['/LiteStep/any/file.rc', 'any/LiteStep/any/file.rc'],
logcheck: ['/etc/logcheck/file.d-some/file', '/etc/logcheck/file.d/file',
'any/etc/logcheck/file.d-some/file', 'any/etc/logcheck/file.d/file'],
@@ -671,7 +671,7 @@ def s:GetFilenameChecks(): dict<list<string>>
sather: ['file.sa'],
sbt: ['file.sbt'],
scala: ['file.scala'],
- scheme: ['file.scm', 'file.ss', 'file.sld'],
+ scheme: ['file.scm', 'file.ss', 'file.sld', 'file.stsg',
'any/local/share/supertux2/config'],
scilab: ['file.sci', 'file.sce'],
screen: ['.screenrc', 'screenrc'],
scss: ['file.scss'],
diff --git a/src/version.c b/src/version.c
index 8fa6c6996..aa5380d35 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 */
+/**/
+ 958,
/**/
957,
/**/
--
--
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 visit
https://groups.google.com/d/msgid/vim_dev/E1tQ0lv-000Lws-S8%40256bit.org.