changeset 36174:b032d755668f v9.1.0738

patch 9.1.0738: filetype: rapid files are not recognized Commit: https://github.com/vim/vim/commit/fdcb08264d6e8525a07b29c14863adc6ead83913 Author: KnoP-01 <knosowski@graeffrobotics.de> Date: Fri Sep 20 22:19:45 2024 +0200 patch 9.1.0738: filetype: rapid files are not recognized Problem: filetype: rapid files are not recognized Solution: detect '*.sysx' and '*.modx' as rapid filetype (KnoP-01) closes: #15669 Signed-off-by: KnoP-01 <knosowski@graeffrobotics.de> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 20 Sep 2024 22:30:04 +0200
parents 50c02bbbfe42
children c39daa6db42d
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -239,7 +239,11 @@ au BufNewFile,BufRead *.cmd
 " ABB RAPID or Batch file for MSDOS.
 au BufNewFile,BufRead *.sys			call dist#ft#FTsys()
 if has("fname_case")
-  au BufNewFile,BufRead *.Sys,*.SYS			call dist#ft#FTsys()
+  au BufNewFile,BufRead *.Sys,*.SYS		call dist#ft#FTsys()
+endif
+au BufNewFile,BufRead *.sysx			setf rapid
+if has("fname_case")
+  au BufNewFile,BufRead *.sysX,*.Sysx,*.SysX,*.SYSX	setf rapid
 endif
 
 " Batch file for 4DOS
@@ -1243,9 +1247,9 @@ au BufNewFile,BufRead *.src			call dist#
 au BufNewFile,BufRead *.dat			call dist#ft#FTdat()
 au BufNewFile,BufRead *.sub			setf krl
 if has("fname_case")
-   au BufNewFile,BufRead *.Src,*.SRC			call dist#ft#FTsrc()
-   au BufNewFile,BufRead *.Dat,*.DAT			call dist#ft#FTdat()
-   au BufNewFile,BufRead *.Sub,*.SUB			setf krl
+   au BufNewFile,BufRead *.Src,*.SRC		call dist#ft#FTsrc()
+   au BufNewFile,BufRead *.Dat,*.DAT		call dist#ft#FTdat()
+   au BufNewFile,BufRead *.Sub,*.SUB		setf krl
 endif
 
 " Kimwitu[++]
@@ -1498,7 +1502,11 @@ au BufNewFile,BufRead *.mmp			setf mmp
 " ABB Rapid, Modula-2, Modsim III or LambdaProlog
 au BufNewFile,BufRead *.mod			call dist#ft#FTmod()
 if has("fname_case")
-   au BufNewFile,BufRead *.Mod,*.MOD			call dist#ft#FTmod()
+   au BufNewFile,BufRead *.Mod,*.MOD		call dist#ft#FTmod()
+endif
+au BufNewFile,BufRead *.modx			setf rapid
+if has("fname_case")
+   au BufNewFile,BufRead *.modX,*.Modx,*.ModX,*.MODX	setf rapid
 endif
 
 " Modula-3 (.m3, .i3, .mg, .ig)
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -603,6 +603,7 @@ def s:GetFilenameChecks(): dict<list<str
     radiance: ['file.rad', 'file.mat'],
     raku: ['file.pm6', 'file.p6', 'file.t6', 'file.pod6', 'file.raku', 'file.rakumod', 'file.rakudoc', 'file.rakutest'],
     raml: ['file.raml'],
+    rapid: ['file.sysx', 'file.Sysx', 'file.SysX', 'file.SYSx', 'file.SYSX', 'file.modx', 'file.Modx', 'file.ModX', 'file.MODx', 'file.MODX'],
     rasi: ['file.rasi'],
     ratpoison: ['.ratpoisonrc', 'ratpoisonrc'],
     rbs: ['file.rbs'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    738,
+/**/
     737,
 /**/
     736,