vim-patch:ef387c062bb1 (#27553)

runtime(filetype): Modula-2 files with priority not detected (vim/vim#14055)

Problem:  Modula-2 files with a specified priority are not detected.
Solution: Match the priority syntax in module header lines when
          performing heuristic content detection.

Disable the :defcompile debug line.  This was accidentally left enabled
in commit 68a8947.

ef387c062b

Co-authored-by: dkearns <dougkearns@gmail.com>
This commit is contained in:
zeertzjq
2024-02-21 06:29:53 +08:00
committed by GitHub
parent 5e4a5f1aaa
commit f25c0c1eb9
2 changed files with 37 additions and 30 deletions

View File

@@ -422,7 +422,7 @@ end
--- @param bufnr integer
--- @return boolean
local function is_modula2(bufnr)
return matchregex(nextnonblank(bufnr, 1), [[\<MODULE\s\+\w\+\s*;\|^\s*(\*]])
return matchregex(nextnonblank(bufnr, 1), [[\<MODULE\s\+\w\+\s*\%(\[.*]\s*\)\=;\|^\s*(\*]])
end
--- @param bufnr integer