summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-04 16:17:06 +0000
committerKarl Berry <karl@freefriends.org>2011-09-04 16:17:06 +0000
commita3988abe9b55774f905e4c441b00a0e5d9bd2d4a (patch)
tree3bc5392fac19471d9d3f7addc6f55bc7b1c03701
parentd74ffd924f55e773aca2fb75178e81d7f92fdf5a (diff)
context-vim (29aug11)
git-svn-id: svn://tug.org/texlive/trunk@23802 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex19
-rw-r--r--Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex18
2 files changed, 16 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex b/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex
index 0614fda760d..b9630e6c8fc 100644
--- a/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex
+++ b/Master/texmf-dist/tex/context/third/vim/t-syntax-groups.tex
@@ -1,15 +1,15 @@
%D \module
%D [ file=t-syntax-groups,
-%D version=2011.08.27,
+%D version=2011.08.28,
%D title=\CONTEXT\ User Module,
%D subtitle=Syntax highlighting support,
%D author=Aditya Mahajan,
%D date=\currentdate,
%D copyright=Aditya Mahajan,
-%D email=adityam <at> umich <dot> edu,
+%D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{ConTeXt User Module / Syntax Highlighting Support ver: 2011.08.27}
+\writestatus{loading}{ConTeXt User Module / Syntax Highlighting Support ver: 2011.08.28}
% Colors are specified in hex; in MkII the hex mode needs to be activated.
\doifmode\s!mkii
@@ -27,6 +27,7 @@
\def\syntaxgroup::name {}
\installparameterhandler \syntaxgroup::namespace \syntaxgroup::id
+\installsetuphandler \syntaxgroup::namespace \syntaxgroup::id
\def\definesyntaxgroup
{\dodoubleargument\syntaxgroup::define}
@@ -39,13 +40,13 @@
\def\syntaxgroup::get_parameters##1%
{
\edef\syntaxgroup::name {##1}
- \getparameters[\syntaxgroup::namespace##1]
- [\c!color=,\c!style=,\c!command=,#2]
+ \setupsyntaxgroup[##1]
+ [\c!color=,\c!style=,\c!command=,#2]
\doifsomething{\syntaxgroupparameter\c!color}
{
\expanded{\definecolor[\syntaxgroup::namespace-##1-color]
[\syntaxgroupparameter\c!color]}
- \getparameters[\syntaxgroup::namespace##1][\c!color=\syntaxgroup::namespace-##1-color]
+ \setupsyntaxgroup[##1][\c!color=\syntaxgroup::namespace-##1-color]
}
}
}{
@@ -65,7 +66,7 @@
\starttexdefinition colorscheme::start [#1]
\pushmacro\colorscheme::name
\setcolorscheme{#1}
- \getparameters[\syntaxgroup::namespace][\c!color=,\c!style=,\c!command=]
+ \setupsyntaxgroup[\c!color=,\c!style=,\c!command=]
\stoptexdefinition
\def\stopcolorscheme
@@ -81,9 +82,9 @@
\edef\syntaxgroup::name{#1}%
\syntaxgroupparameter\c!command
{
- \dostartattributes{\syntaxgroup::namespace #1}\c!style\c!color
+ \externalfilter::attributes_start\syntaxgroup::id\c!style\c!color
#2
- \dostopattributes
+ \externalfilter::attributes_stop
}
\endgroup
\stoptexdefinition
diff --git a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex
index aabc35cb6a3..8c0cf3d3f1d 100644
--- a/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex
+++ b/Master/texmf-dist/tex/context/third/vim/t-syntax-highlight.tex
@@ -1,15 +1,15 @@
%D \module
%D [ file=t-syntax-highlight,
-%D version=2011.08.27,
+%D version=2011.08.28,
%D title=\CONTEXT\ User Module,
%D subtitle=Code syntax highlighting,
%D author=Aditya Mahajan,
%D date=\currentdate,
%D copyright=Aditya Mahajan,
-%D email=adityam <at> umich <dot> edu,
+%D email=adityam <at> ieee <dot> org,
%D license=Simplified BSD License]
-\writestatus{loading}{ConTeXt User Module / Code syntax highlighting ver: 2011.08.27}
+\writestatus{loading}{ConTeXt User Module / Code syntax highlighting ver: 2011.08.28}
\startmodule [syntax-highlight]
\usemodule [syntax-groups]
@@ -63,7 +63,7 @@
\let\}\textbraceright
\def\tab##1%
- {\dorecurse{##1}{\space}}%
+ {\dorecurse{##1}{\obeyedspace}}%
\doifmode\s!mkii{\setups{syntaxhighlighting::setup_line_number_mkii}}%
@@ -71,6 +71,7 @@
{\setupwhitespace[\v!none,\v!flexible]}%
\setcatcodetable\externalfilter::minimal_catcodes
+ \expandafter\def\activeendoflinetoken{\strut\par}
\activatespacehandler{\syntaxhighlighting::namespace\externalfilterparameter\c!space}
\stopsetups
@@ -147,14 +148,7 @@
\stoptexdefinition
\starttexdefinition syntaxhighlighting::read_command_aux #1
- % In the filter module, style=something does not work in MkII.
- % So, we explicitly add the global style before reading the file.
- %
- \dostartattributes{\syntaxhighlighting::namespace}\c!style\c!color
- \dostartattributes{\syntaxhighlighting::namespace\syntaxhighlighting::name}\c!style\c!color
- \ReadFile{#1}
- \dostopattributes
- \dostopattributes
+ \ReadFile{#1}
\stoptexdefinition
\stopmode