summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv60
1 files changed, 18 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
index 6889f9e63ff..71c6478f8c3 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/attr-ini.mkiv
@@ -61,55 +61,31 @@
% here public means 'visible' so it's not to be confused with 'public' at the lua end
-% \def\attr_basics_define_indeed#1[#2][#3]%
-% {\ifcsname\??attributecount#2\endcsname\else
-% \scratchcounter\clf_defineattribute{#2}{#1}\relax
-% %\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
-% \expandafter\attributedef\csname\??attributecount#2\endcsname\scratchcounter
-% \expandafter\newconstant \csname\??attributeid#2\endcsname
-% \csname\??attributeid#2\endcsname\scratchcounter
-% % some attributes are always global
-% \doifelseinset\s!global{#3}%
-% {\etoksapp\t_attr_list_global{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
-% {\etoksapp\t_attr_list_local {\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
-% \doifinset\s!nomath{#3}%
-% {\etoksapp\t_attr_list_nomath{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
-% \doifinset\s!public{#3}%
-% {\expandafter\let\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}%
-% \doifinset\s!pickup{#3}%
-% {\expandafter\newconstant\csname\??attributepickup#2\endcsname
-% \csname\??attributepickup#2\endcsname\attributeunsetvalue
-% \etoksapp\t_attr_list_pickup{\csname\??attributecount#2\endcsname\csname\??attributepickup#2\endcsname}%
-% \ifcsname#2\s!attribute\endcsname
-% \expandafter\edef\csname\s!pickup#2\s!attribute\endcsname
-% {\csname\??attributepickup#2\endcsname\csname\??attributecount#2\endcsname}%
-% \expandafter\edef\csname\s!forget#2\s!attribute\endcsname
-% {\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
-% \fi}%
-% \fi}
+% \let\attr_prefix\??attributecount
+\def\attr_prefix{c_attr_}
\def\attr_basics_define_indeed#1[#2][#3]%
- {\ifcsname\??attributecount#2\endcsname\else
+ {\ifcsname\attr_prefix#2\endcsname\else
\scratchcounter\clf_defineattribute{#2}{#1}\relax
%\writestatus\m!system{defining #1 attribute #2 with number \number\scratchcounter}%
- \global\expandafter\attributedef\csname\??attributecount#2\endcsname\scratchcounter
+ \global\expandafter\attributedef\csname\attr_prefix#2\endcsname\scratchcounter
\global\expandafter\newconstant \csname\??attributeid#2\endcsname
\global\csname\??attributeid#2\endcsname\scratchcounter
% some attributes are always global
\doifelseinset\s!global{#3}%
- {\xtoksapp\t_attr_list_global{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
- {\xtoksapp\t_attr_list_local {\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
+ {\xtoksapp\t_attr_list_global{\csname\attr_prefix#2\endcsname\attributeunsetvalue}}%
+ {\xtoksapp\t_attr_list_local {\csname\attr_prefix#2\endcsname\attributeunsetvalue}}%
\doifinset\s!nomath{#3}%
- {\xtoksapp\t_attr_list_nomath{\csname\??attributecount#2\endcsname\attributeunsetvalue}}%
+ {\xtoksapp\t_attr_list_nomath{\csname\attr_prefix#2\endcsname\attributeunsetvalue}}%
\doifinset\s!public{#3}%
{\expandafter\glet\csname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}%
\doifinset\s!pickup{#3}%
{\global\expandafter\newconstant\csname\??attributepickup#2\endcsname
\global\csname\??attributepickup#2\endcsname\attributeunsetvalue
- \xtoksapp\t_attr_list_pickup{\csname\??attributecount#2\endcsname\csname\??attributepickup#2\endcsname}%
+ \xtoksapp\t_attr_list_pickup{\csname\attr_prefix#2\endcsname\csname\??attributepickup#2\endcsname}%
\ifcsname#2\s!attribute\endcsname
\expandafter\xdef\csname\s!pickup#2\s!attribute\endcsname
- {\csname\??attributepickup#2\endcsname\csname\??attributecount#2\endcsname}%
+ {\csname\??attributepickup#2\endcsname\csname\attr_prefix#2\endcsname}%
\expandafter\xdef\csname\s!forget#2\s!attribute\endcsname
{\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
\fi}%
@@ -119,10 +95,10 @@
{\the\t_attr_list_pickup\relax}
% \unexpanded\def\pickupattribute#1%
-% {\csname\??attributecount#1\endcsname\csname\??attributepickup#1\endcsname}
+% {\csname\attr_prefix#1\endcsname\csname\??attributepickup#1\endcsname}
% \unexpanded\def\pickupattributelater#1%
-% {\csname\??attributepickup#1\endcsname\csname\??attributecount#1\endcsname}
+% {\csname\??attributepickup#1\endcsname\csname\attr_prefix#1\endcsname}
% \unexpanded\def\newattribute#1%
% {\attr_basics_define_indeed\s!public[\csstring#1][]%
@@ -134,9 +110,9 @@
% expandable so we can \edef them for speed
-\def\dosetattribute#1#2{\csname\??attributecount#1\endcsname#2\relax}
-\def\doresetattribute#1{\csname\??attributecount#1\endcsname\attributeunsetvalue}
-\def\dogetattribute #1{\number\csname\??attributecount#1\endcsname}
+\def\dosetattribute#1#2{\csname\attr_prefix#1\endcsname#2\relax}
+\def\doresetattribute#1{\csname\attr_prefix#1\endcsname\attributeunsetvalue}
+\def\dogetattribute #1{\number\csname\attr_prefix#1\endcsname}
\def\dogetattributeid#1{\number\csname\??attributeid#1\endcsname}
\let\dompattribute\gobbletwoarguments
@@ -145,8 +121,8 @@
\unexpanded\def\resetglobalattributes{\the\t_attr_list_global\attribute\zerocount\zerocount}
\unexpanded\def\resetlocalattributes {\the\t_attr_list_local \attribute\zerocount\zerocount}
\else
- \unexpanded\def\resetglobalattributes{\the\t_attr_list_global\glyphdatafield \zerocount}
- \unexpanded\def\resetlocalattributes {\the\t_attr_list_local \glyphdatafield \zerocount}
+ \unexpanded\def\resetglobalattributes{\the\t_attr_list_global\glyphdatafield\zerocount\glyphscriptfield\zerocount}
+ \unexpanded\def\resetlocalattributes {\the\t_attr_list_local \glyphdatafield\zerocount\glyphscriptfield\zerocount}
\fi
\let\resetallattributes\resetlocalattributes
@@ -163,8 +139,8 @@
%definesystemattribute [state] % nomath
\definesystemattribute [color] [public] % global
\definesystemattribute [colormodel] [public,global]
-% \definesystemattribute [skip]
-% \definesystemattribute [penalty]
+%definesystemattribute [skip]
+%definesystemattribute [penalty]
\definesystemattribute [transparency] [public]
\definesystemattribute [reference] [public]
\definesystemattribute [destination] [public]