updated for version 7.3.423
Problem: Small mistakes in comments, proto and indent.
Solution: Fix the mistakes.
Also update runtime files
diff --git a/runtime/syntax/mma.vim b/runtime/syntax/mma.vim
index f48dcce..c63beb1 100644
--- a/runtime/syntax/mma.vim
+++ b/runtime/syntax/mma.vim
@@ -1,12 +1,12 @@
" Vim syntax file
" Language: Mathematica
" Maintainer: steve layland <layland@wolfram.com>
-" Last Change: Thu May 19 21:36:04 CDT 2005
+" Last Change: 2012 Feb 03 by Thilo Six
" Source: http://members.wri.com/layland/vim/syntax/mma.vim
" http://vim.sourceforge.net/scripts/script.php?script_id=1273
" Id: $Id: mma.vim,v 1.4 2006/04/14 20:40:38 vimboss Exp $
" NOTE:
-"
+"
" Empty .m files will automatically be presumed as Matlab files
" unless you have the following in your .vimrc:
"
@@ -14,7 +14,7 @@
"
" I also recommend setting the default 'Comment' hilighting to something
" other than the color used for 'Function', since both are plentiful in
-" most mathematica files, and they are often the same color (when using
+" most mathematica files, and they are often the same color (when using
" background=dark).
"
" Credits:
@@ -24,11 +24,11 @@
" from the Java vim syntax file by Claudio Fleiner. Thanks!
" o Everything else written by steve <layland@wolfram.com>
"
-" Bugs:
-" o Vim 6.1 didn't really have support for character classes
+" Bugs:
+" o Vim 6.1 didn't really have support for character classes
" of other named character classes. For example, [\a\d]
" didn't work. Therefore, a lot of this code uses explicit
-" character classes instead: [0-9a-zA-Z]
+" character classes instead: [0-9a-zA-Z]
"
" TODO:
" folding
@@ -41,6 +41,9 @@
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
" Group Definitions:
syntax cluster mmaNotes contains=mmaTodo,mmaFixme
syntax cluster mmaComments contains=mmaComment,mmaFunctionComment,mmaItem,mmaFunctionTitle,mmaCommentStar
@@ -58,7 +61,7 @@
syntax keyword mmaVariable True False None Automatic All Null C General
" mathematical constants:
-syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher
+syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher
" stream data / atomic heads:
syntax keyword mmaVariable Byte Character Expression Number Real String Word EndOfFile Integer Symbol
@@ -80,7 +83,7 @@
syntax keyword mmaVariable Black Blue Brown Cyan Gray Green Magenta Orange Pink Purple Red White Yellow
" function attributes
-syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub
+syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub
" Comment Sections:
" this:
@@ -135,25 +138,25 @@
" Patterns:
" Each pattern marker below can be Blank[] (_), BlankSequence[] (__)
-" or BlankNullSequence[] (___). Most examples below can also be
+" or BlankNullSequence[] (___). Most examples below can also be
" combined, for example Pattern tests with Default values.
-"
+"
" _Head Anonymous patterns
-" name_Head
+" name_Head
" name:(_Head|_Head2) Named patterns
-"
+"
" _Head : val
" name:_Head:val Default values
"
-" _Head?testQ,
+" _Head?testQ,
" _Head?(test[#]&) Pattern tests
"
" name_Head/;test[name] Conditionals
-"
+"
" _Head:. Predefined Default
"
" .. ... Pattern Repeat
-
+
syntax match mmaPatternError "\%(_\{4,}\|)\s*&\s*)\@!\)" contained
"pattern name:
@@ -172,7 +175,7 @@
" >= <= < >
" += -= *=
" /= ++ -- Math
-" ^*
+" ^*
" -> :> Rules
" @@ @@@ Apply
" /@ //@ Map
@@ -200,7 +203,7 @@
syntax match mmaPureFunction "&"
" Named Functions:
-" Since everything is pretty much a function, get this straight
+" Since everything is pretty much a function, get this straight
" from context
syntax match mmaGenericFunction "[A-Za-z0-9`]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator
syntax match mmaGenericFunction "\~\s*[^~]\+\s*\~"hs=s+1,he=e-1 contains=mmaOperator,mmaBoring
@@ -223,7 +226,7 @@
syntax match mmaError "\%([/]{3,}\|[&:|+*?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings
" Punctuation:
-" things that shouldn't really be highlighted, or highlighted
+" things that shouldn't really be highlighted, or highlighted
" in they're own group if you _really_ want. :)
" ( ) { }
" TODO - use Delimiter group?
@@ -251,9 +254,9 @@
"function MmaFoldText()
" let line = getline(v:foldstart)
-"
+"
" let lines = v:foldend-v:foldstart+1
-"
+"
" let sub = substitute(line, '(\*\+|\*\+)|[-*_]\+', '', 'g')
"
" if match(line, '(\*') != -1
@@ -264,7 +267,7 @@
"
" return v:folddashes.' '.lines.' '.sub
"endf
-
+
"this is slow for computing folds, but it does so accurately
syntax sync fromstart
@@ -288,8 +291,8 @@
command -nargs=+ HiLink hi def link <args>
endif
- " NOTE - the following links are not guaranteed to
- " look good under all colorschemes. You might need to
+ " NOTE - the following links are not guaranteed to
+ " look good under all colorschemes. You might need to
" :so $VIMRUNTIME/syntax/hitest.vim and tweak these to
" look good in yours
@@ -323,3 +326,6 @@
endif
let b:current_syntax = "mma"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save