patch 9.0.2062: Janet files are not recognised

Commit: 
https://github.com/vim/vim/commit/c038427d2a27445e612761f19c92b2b8b05afdea
Author: Doug Kearns <[email protected]>
Date:   Mon Oct 23 19:24:05 2023 +0200

    patch 9.0.2062: Janet files are not recognised
    
    Problem:  Janet files are not recognised
    Solution: Add filename and shebang detection (without
              adding an extra filetype plugin)
    
    Those are used by the Janet language:
    http://www.janet-lang.org
    
    closes: #13400
    
    Signed-off-by: Christian Brabandt <[email protected]>
    Co-authored-by: Doug Kearns <[email protected]>

diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim
index fca5dcdbe..fd7b8e08f 100644
--- a/runtime/autoload/dist/script.vim
+++ b/runtime/autoload/dist/script.vim
@@ -217,6 +217,10 @@ export def Exe2filetype(name: string, line1: string): 
string
   elseif name =~ '^\%(rexx\|regina\)\>'
     return 'rexx'
 
+    # Janet
+  elseif name =~ '^janet\>'
+    return 'janet'
+
   endif
 
   return ''
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 07d6bbfca..aa66bead3 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1034,6 +1034,9 @@ au BufNewFile,BufRead *.jal,*.JAL         setf jal
 " Jam
 au BufNewFile,BufRead *.jpl,*.jpr              setf jam
 
+" Janet
+au BufNewFile,BufRead *.janet                  setf janet
+
 " Java
 au BufNewFile,BufRead *.java,*.jav             setf java
 
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index f68ad00dd..6b049afa9 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -335,6 +335,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     j: ['file.ijs'],
     jal: ['file.jal', 'file.JAL'],
     jam: ['file.jpl', 'file.jpr', 'JAM-file.file', 'JAM.file', 
'Prl-file.file', 'Prl.file'],
+    janet: ['file.janet'],
     java: ['file.java', 'file.jav'],
     javacc: ['file.jj', 'file.jjt'],
     javascript: ['file.js', 'file.jsm', 'file.javascript', 'file.es', 
'file.mjs', 'file.cjs'],
@@ -953,6 +954,7 @@ def s:GetScriptChecks(): dict<list<list<string>>>
     crystal: [['#!/path/crystal']],
     rexx:   [['#!/path/rexx'],
             ['#!/path/regina']],
+    janet: [['#!/path/janet']],
   }
 enddef
 
diff --git a/src/version.c b/src/version.c
index a8de25a1f..67f39f28f 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 */
+/**/
+    2062,
 /**/
     2061,
 /**/

-- 
-- 
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/E1quyki-00203x-4b%40256bit.org.

Raspunde prin e-mail lui