patch 9.1.0919: filetype: some assembler files are not recognized

Commit: 
https://github.com/vim/vim/commit/d66d68763d0947c292a9fdda4da6fda3650fa563
Author: Wu, Zhenyu <wuzhe...@ustc.edu>
Date:   Thu Dec 12 19:31:54 2024 +0100

    patch 9.1.0919: filetype: some assembler files are not recognized
    
    Problem:  filetype: some assembler are files not recognized
    Solution: detect '*.nasm' files as nasm filetype and '*.masm' as masm
              filetype (Wu, Zhenyu)
    
    closes: #16194
    
    Signed-off-by: Wu, Zhenyu <wuzhe...@ustc.edu>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index b0c77db1d..eb6c3b233 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt*   For Vim version 9.1.  Last change: 2024 Nov 10
+*syntax.txt*   For Vim version 9.1.  Last change: 2024 Dec 12
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -883,12 +883,15 @@ There are many types of assembly languages that all use 
the same file name
 extensions.  Therefore you will have to select the type yourself, or add a
 line in the assembly file that Vim will recognize.  Currently these syntax
 files are included:
-       asm             GNU assembly (the default)
+       asm             GNU assembly (usually have .s or .S extension and were
+                       already built using C compiler such as GCC or CLANG)
        asm68k          Motorola 680x0 assembly
        asmh8300        Hitachi H-8300 version of GNU assembly
        ia64            Intel Itanium 64
        fasm            Flat assembly (http://flatassembler.net)
-       masm            Microsoft assembly (probably works for any 80x86)
+       masm            Microsoft assembly (.masm files are compiled with
+                       Microsoft's Macro Assembler. This is only supported
+                       for x86, x86_64, ARM and AARCH64 CPU families)
        nasm            Netwide assembly
        tasm            Turbo Assembly (with opcodes 80x86 up to Pentium, and
                        MMX)
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index fe1204778..cac7c2ca4 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2024 Nov 24
+" Last Change: 2024 Dec 12
 " Former Maintainer:   Bram Moolenaar <b...@vim.org>
 
 " Listen very carefully, I will say this only once
@@ -183,8 +183,15 @@ au BufNewFile,BufRead 
*.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
 
 " Assembly (all kinds)
 " *.lst is not pure assembly, it has two extra columns (address, byte codes)
+" *.[sS], *.[aA] usually Assembly - GNU
 au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst  call dist#ft#FTasm()
 
+" Assembly - Netwide
+au BufNewFile,BufRead *.nasm                   setf nasm
+
+" Assembly - Microsoft
+au BufNewFile,BufRead *.masm                   setf masm
+
 " Assembly - Macro (VAX)
 au BufNewFile,BufRead *.mar                    setf vmasm
 
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 2dc0f4961..e9535bf03 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -113,6 +113,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     arduino: ['file.ino', 'file.pde'],
     art: ['file.art'],
     asciidoc: ['file.asciidoc', 'file.adoc'],
+    asm: ['file.s', 'file.S', 'file.a', 'file.A'],
     asn: ['file.asn', 'file.asn1'],
     asterisk: ['asterisk/file.conf', 'asterisk/file.conf-file', 
'some-asterisk/file.conf', 'some-asterisk/file.conf-file'],
     astro: ['file.astro'],
@@ -456,6 +457,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     map: ['file.map'],
     maple: ['file.mv', 'file.mpl', 'file.mws'],
     markdown: ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 
'file.mdwn', 'file.md'],
+    masm: ['file.masm'],
     mason: ['file.mason', 'file.mhtml'],
     master: ['file.mas', 'file.master'],
     matlab: ['file.m'],
@@ -532,6 +534,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     n1ql: ['file.n1ql', 'file.nql'],
     named: ['namedfile.conf', 'rndcfile.conf', 'named-file.conf', 
'named.conf', 'rndc-file.conf', 'rndc-file.key', 'rndc.conf', 'rndc.key'],
     nanorc: ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'],
+    nasm: ['file.nasm'],
     natural: ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 
'file.NSN', 'file.NSP', 'file.NSS'],
     ncf: ['file.ncf'],
     neomuttlog: ['/home/user/.neomuttdebug1'],
diff --git a/src/version.c b/src/version.c
index 4fb60ac6e..50596585c 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 */
+/**/
+    919,
 /**/
     918,
 /**/

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1tLoPt-009MYI-4R%40256bit.org.

Raspunde prin e-mail lui