[m-rev.] diff: Delete support for highlighting Erlang code in vim syntax file.
Peter Wang
novalazy at gmail.com
Fri Oct 30 13:37:16 AEDT 2020
vim/syntax/mercury.vim:
As above.
Also delete "il" and "IL" as recognised foreign languages.
vim/doc/mercury.txt:
Update documentation.
diff --git a/vim/doc/mercury.txt b/vim/doc/mercury.txt
index 3f4bf10b0..fac726cc7 100644
--- a/vim/doc/mercury.txt
+++ b/vim/doc/mercury.txt
@@ -136,7 +136,7 @@ if you want to disable this, please use: >
let mercury_no_highlight_tabs = 1
<
-Highlighting of C, Java, C# and Erlang code is supported by default,
+Highlighting of C, Java and C# code is supported by default,
disable (if you think loading huge files is slow) with: >
let mercury_no_highlight_foreign = 1
diff --git a/vim/syntax/mercury.vim b/vim/syntax/mercury.vim
index 61e54d7f6..e15d7789a 100644
--- a/vim/syntax/mercury.vim
+++ b/vim/syntax/mercury.vim
@@ -2,7 +2,7 @@
" Language: Mercury
" Maintainer: Sebastian Godelet <sebastian.godelet at outlook.com>
" Extensions: *.m *.moo
-" Last Change: 2018-09-01
+" Last Change: 2020-10-30
" for documentation, please use :help mercury-syntax
@@ -308,12 +308,8 @@ if !exists("mercury_no_highlight_foreign") || !mercury_no_highlight_foreign
syn region mercuryForeignJavaBlock matchgroup=mercuryBracket start=/\v\(("Java"|java)/rs=s+1 end=')'
\ transparent fold contained contains=@mercuryForeign,
\ mercuryJavaCode,mercuryBlock
- syn region mercuryForeignErlangBlock matchgroup=mercuryBracket start=/\v\(("Erlang"|erlang)/rs=s+1 end=')'
- \ transparent fold contained contains=@mercuryForeign,
- \ mercuryErlangCode,mercuryBlock
syn cluster mercuryForeignBlock contains=mercuryForeignCBlock,
- \ mercuryForeignCSharpBlock,mercuryForeignJavaBlock,
- \ mercuryForeignErlangBlock
+ \ mercuryForeignCSharpBlock,mercuryForeignJavaBlock
syn match mercuryPragmaForeign /\v^\s*:-\s+pragma\s+foreign_(code|proc|decl|type|export(_enum)?|enum|import_module)/
\ transparent nextgroup=@mercuryForeignBlock
@@ -414,39 +410,11 @@ if !exists("mercury_no_highlight_foreign") || !mercury_no_highlight_foreign
syn region mercuryJavaCode matchgroup=mercuryString start=+"+ skip=+""+ end=+"+
\ transparent fold contained contains=@mercuryCppLike,mercuryCString,mercuryJavaType
- " Declaration for Erlang
- syn keyword mercuryErlangKeyword contained after and andalso band begin bnot bor bsl bsr bxor case
- \ catch cond end fun if let not of orelse query receive throw try when xor
- " syn keyword mercuryErlangBool true false
- syn match mercuryErlangExtNumLiteral "\v([2-9]|[12][0-9]|3[0-6])#[A-Za-z0-9]+" contained
- syn match mercuryErlangOperator "\v[?]" contained
- syn match mercuryErlangLogical "\v[,;.]" contained
- syn region mercuryErlangString start=+""+ end=+""+ contained contains=@Spell
- syn region mercuryErlangString start=+\v\\"+ end=+\v\\"+ contained contains=@Spell
- syn cluster mercuryErlangTerms contains=mercuryErlangBlock,mercuryErlangList,
- \ mercuryErlangString,mercuryCLikeChar,mercuryCLikeNumber,
- \ mercuryErlangExtNumLiteral,mercuryFloat,mercuryComment,mercuryKeyword,
- \ mercuryErlangKeyword, mercuryErlangOperator, mercuryCComment,
- \ mercuryErlangBool,mercuryOperator,mercurySingleton,mercuryImplication,
- \ mercuryErlangDCGAction,mercuryErlangLogical, at mercuryFormatting
- syn region mercuryErlangList contained matchgroup=mercuryBracket
- \ start='\[' end=']' transparent fold contains=@mercuryErlangTerms
- syn region mercuryErlangBlock contained matchgroup=mercuryBracket
- \ start='(' end=')' transparent fold contains=@mercuryErlangTerms
- syn region mercuryErlangDCGAction contained matchgroup=mercuryBracket
- \ start='{' end='}' transparent fold contains=@mercuryErlangTerms
-
- syn cluster mercuryErlang contains=@mercuryErlangTerms,mercuryErlangDCGAction,
- \ mercuryForeignIface
-
- syn region mercuryErlangCode matchgroup=mercuryString start=+"+ skip=+""+ end=+"+
- \ transparent fold contained contains=@mercuryErlang
-
" Matching the foreign language name identifiers, this comes after all the
" code blocks, to match the identifiers in quotes
- syn match mercuryForeignId /\v<(c|csharp|java|il|erlang)>/ contained
+ syn match mercuryForeignId /\v<(c|csharp|java)>/ contained
syn region mercuryForeignId contained matchgroup=mercuryString
- \ start=+\v["](C#|Java|C|I[Ll]|Erlang)["]{-}+rs=s+1 end=+"+
+ \ start=+\v["](C#|Java|C)["]{-}+rs=s+1 end=+"+
" Matching foreign interface builtins and success indicator
syn keyword mercuryForeignIface contained SUCCESS_INDICATOR
@@ -620,12 +588,6 @@ if !exists("mercury_no_highlight_foreign") || !mercury_no_highlight_foreign
hi def link mercuryCSharpType mercuryForeignType
hi def link mercuryJavaBool mercuryBool
hi def link mercuryJavaType mercuryForeignType
- hi def link mercuryErlangKeyword Keyword
- hi def link mercuryErlangOperator Operator
- hi def link mercuryErlangBool mercuryBool
- hi def link mercuryErlangExtNumLiteral Number
- hi def link mercuryErlangString String
- hi def link mercuryErlangLogical mercuryLogical
if exists("mercury_highlight_extra") && mercury_highlight_extra
hi def link mercuryForeignType Type
else
--
2.28.0
More information about the reviews
mailing list