patch 9.1.0769: filetype: MLIR files are not recognized

Commit: 
https://github.com/vim/vim/commit/347d43bd33519ab537f77d1a8fa8ab8f9196bcb9
Author: Wu, Zhenyu <[email protected]>
Date:   Tue Oct 8 21:58:35 2024 +0200

    patch 9.1.0769: filetype: MLIR files are not recognized
    
    Problem:  filetype: MLIR files are not recognized
    Solution: Detect '*.mlir' files as mlir filetype,
              include a mlir filetype plugin
              (Wu, Zhenyu)
    
    closes: #15826
    
    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 7f3962521..4b5577acb 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -576,6 +576,9 @@ au BufNewFile,BufRead lynx.cfg                      setf 
lynx
 " LyRiCs
 au BufNewFile,BufRead *.lrc                    setf lyrics
 
+" MLIR
+au BufNewFile,BufRead *.mlir                   setf mlir
+
 " Modula-3 configuration language (must be before *.cfg and *makefile)
 au BufNewFile,BufRead *.quake,cm3.cfg          setf m3quake
 au BufNewFile,BufRead m3makefile,m3overrides   setf m3build
diff --git a/runtime/ftplugin/mlir.vim b/runtime/ftplugin/mlir.vim
new file mode 100644
index 000000000..c6a9dc341
--- /dev/null
+++ b/runtime/ftplugin/mlir.vim
@@ -0,0 +1,10 @@
+" Vim filetype plugin file
+" Language:    MLIR
+
+if exists("b:did_ftplugin") | finish | endif
+let b:did_ftplugin = 1
+
+setl comments=:///,://
+setl commentstring=//\ %s
+
+let b:undo_ftplugin = "setl commentstring< comments<"
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index a780002ba..bd79fbb78 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -479,6 +479,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     mgp: ['file.mgp'],
     mib: ['file.mib', 'file.my'],
     mix: ['file.mix', 'file.mixal'],
+    mlir: ['file.mlir'],
     mma: ['file.nb', 'file.wl'],
     mmp: ['file.mmp'],
     modconf: ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', 
'/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 
'any/etc/modules', 'any/etc/modules.conf'],
diff --git a/src/version.c b/src/version.c
index bff689e65..b87fc7870 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 */
+/**/
+    769,
 /**/
     768,
 /**/

-- 
-- 
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/E1syGbn-003dCg-My%40256bit.org.

Raspunde prin e-mail lui