diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-01-24 11:11:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-01-24 11:11:00 +0100 |
commit | a09a16817c8461b4f1c518f5dab0fa3f734b62d6 (patch) | |
tree | 5f6402554ed7f5882d29c54b5c9ef4fb663d75d3 /tex/context/base/mult-ini.mkiv | |
parent | 2c97049c16bd99dc7226b879c171246e34ec219c (diff) | |
download | context-a09a16817c8461b4f1c518f5dab0fa3f734b62d6.tar.gz |
beta 2012.01.24 11:11
Diffstat (limited to 'tex/context/base/mult-ini.mkiv')
-rw-r--r-- | tex/context/base/mult-ini.mkiv | 62 |
1 files changed, 46 insertions, 16 deletions
diff --git a/tex/context/base/mult-ini.mkiv b/tex/context/base/mult-ini.mkiv index 21727f564..f0d47103d 100644 --- a/tex/context/base/mult-ini.mkiv +++ b/tex/context/base/mult-ini.mkiv @@ -40,9 +40,10 @@ %D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR %D \HL %D \NC \type{\c!prefix!} \NC c! \NC constant (direct) \NC\FR +%D \NC \type{\k!prefix!} \NC k! \NC constant (indirect) \NC\FR %D \NC \type{\e!prefix!} \NC e! \NC element \NC\MR %D \NC \type{\f!prefix!} \NC f! \NC file \NC\MR -%D \NC \type{\m!prefix!} \NC m! \NC age \NC\MR +%D \NC \type{\m!prefix!} \NC m! \NC age \NC\MR %D \NC \type{\s!prefix!} \NC s! \NC system \NC\MR %D \NC \type{\v!prefix!} \NC v! \NC variable \NC\MR %D \HL @@ -54,6 +55,7 @@ %D are obsolete (we had some 12 originally). \def\c!prefix!{c!} +\def\k!prefix!{k!} \def\e!prefix!{e!} \def\f!prefix!{f!} % for the moment we keep this one \def\m!prefix!{m!} @@ -419,22 +421,43 @@ %D We already defined these auxiliary macros in the system %D modules. Starting with this module however, we have to take %D multi||linguality a bit more serious. -%D -%D The additional \type {\c!internal!n} prefixing is no longer -%D needed as we now have separate interface files when dealing -%D with setups (quick ref docs) and no longer reload the whole -%D interface. (We no longer need the link back to the main -%D internal interface.) -\unexpanded\def\doletvalue #1#2{\expandafter \let\csname#1#2\endcsname} -\unexpanded\def\dosetvalue #1#2{\expandafter \def\csname#1#2\endcsname} -\unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1#2\endcsname} -\unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1#2\endcsname} -\unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1#2\endcsname} -\unexpanded\def\docopyvalue #1#2#3{\expandafter \def\csname#1#3\expandafter\endcsname\expandafter{\csname#2#3\endcsname}} +%D In due time, when we exclusively use the parameter handler code, we can drop +%D the backmapping (\type{\c!k...}) and make \type {\c!c...} similar to +%D \type {\v!...}. In that case we can simply the following setters. + +\unexpanded\def\doletvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetvalue #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} +\unexpanded\def\doresetvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty} +\unexpanded\def\doignorevalue#1#2#3{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname\empty} + +\unexpanded\def\docopyvalue#1#2#3% + {\ifcsname\k!prefix!#3\endcsname + \expandafter\def\csname#1\csname\k!prefix!#3\endcsname\expandafter\endcsname\expandafter + {\csname#2\csname\k!prefix!#3\endcsname\endcsname}% + \else + \expandafter\def\csname#1#3\expandafter\endcsname\expandafter + {\csname#2#3\endcsname}% + \fi} + +\startinterface english + + \unexpanded\def\doletvalue #1#2{\expandafter \let\csname#1#2\endcsname} + \unexpanded\def\dosetvalue #1#2{\expandafter \def\csname#1#2\endcsname} + \unexpanded\def\dosetevalue #1#2{\expandafter\edef\csname#1#2\endcsname} + \unexpanded\def\dosetgvalue #1#2{\expandafter\gdef\csname#1#2\endcsname} + \unexpanded\def\dosetxvalue #1#2{\expandafter\xdef\csname#1#2\endcsname} + \unexpanded\def\doresetvalue #1#2{\expandafter \let\csname#1#2\endcsname\empty} + \unexpanded\def\doignorevalue#1#2#3{\expandafter \let\csname#1#2\endcsname\empty} -\unexpanded\def\doresetvalue #1#2{\expandafter \let\csname#1#2\endcsname\empty} -\unexpanded\def\doignorevalue#1#2#3{\expandafter \let\csname#1#2\endcsname\empty} + \unexpanded\def\docopyvalue#1#2#3% + {\expandafter\def\csname#1#3\expandafter\endcsname\expandafter + {\csname#2#3\endcsname}} + +\stopinterface %D We can now redefine some messages that will be %D introduced in the multi||lingual system module. @@ -753,11 +776,18 @@ %D For at the \LUA\ end (experiment): -\def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}} +\def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}% + \expandafter\gdef\csname\k!prefix!#2\endcsname{#1}} % backmapping from non english \def\do@sivar#1#2{\expandafter\gdef\csname\v!prefix!#1\endcsname{#2}} \def\do@siele#1#2{\expandafter\gdef\csname\e!prefix!#1\endcsname{#2}} \def\do@sicom#1#2{\expandafter\gdef\csname#2\expandafter\endcsname\expandafter{\csname#1\endcsname}} +\startinterface english + + \def\do@sicon#1#2{\expandafter\gdef\csname\c!prefix!#1\endcsname{#1}} + +\stopinterface + %D So much for the basic multi||lingual interface commands. The %D macro's can be enhanced with more testing facilities, but %D for the moment they suffice. |