Commits

Wolfgang Schuster committed 6acc0d8 Draft

Replace \definenamespace with \installcommandhandler

Comments (0)

Files changed (1)

files/t-algorithmic.mkiv

 %D \module
 %D   [     file=t-algorithmic,
-%D      version=2011.12.05,
+%D      version=2012.01.04,
 %D        title=\CONTEXT\ User Module,
 %D     subtitle=Algorithms,
 %D       author=Wolfgang Schuster,
   \setinterfacevariable {algorithmic} {algorithmic}
 \stopinterface
 
-\definenamespace
-  [algorithmic]
-  [     type=module,
-     comment=Algorithms,
-     version=2011.02.27,
-        name=algorithmic,
-       style=yes,
-     command=yes,
-       setup=list,
-   \s!parent=algorithmic]
+\installnamespace                       {algorithmic}
+\installcommandhandler \????algorithmic {algorithmic} \????algorithmic
 
 \appendtoks
   \setuevalue{\e!start\currentalgorithmic}{\algorithmic_start[\currentalgorithmic]}%
 \unexpanded\def\algorithmic_start[#1]%
   {\begingroup
    \edef\currentalgorithmic{#1}%
-   \dosingleempty\algorithmic__start}
+   \dosingleempty\algorithmic_start_indeed}
 
-\def\algorithmic__start[#1]%
+\def\algorithmic_start_indeed[#1]%
   {\iffirstargument
-     \setupalgorithmic[\currentalgorithmic][#1]%
+     \setupcurrentalgorithmic[#1]%
    \fi
-   \the\everyalgorithmic
+   \the\t_algorithmic_commands
    \doifsomething{\algorithmicparameter\c!spacebefore}{\blank[\algorithmicparameter\c!spacebefore]}%
    \algorithmicparameter\c!before
    \setupwhitespace[\v!none]%
 % The commands in the environment are all uppercase, the connection
 % between them and their defintion happens here.
 
-\newtoks\everyalgorithmic
+\newtoks\t_algorithmic_commands
 
 \def\algorithmic_define
-  {\dodoubleargument\algorithmic__define}
+  {\dodoubleargument\algorithmic_define_indeed}
 
-\def\algorithmic__define[#1][#2]%
-  {\appendtoks\letvalue{#1}#2\to\everyalgorithmic}
+\def\algorithmic_define_indeed[#1][#2]%
+  {\appendtoks\letvalue{#1}#2\to\t_algorithmic_commands}
 
 \algorithmic_define [STATE]    [\algorithmic_state   ]
 \algorithmic_define [IF]       [\algorithmic_if      ]