summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv31
1 files changed, 29 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv b/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv
index 4c2db68f327..c69f3febb93 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-tex.mkiv
@@ -32,11 +32,38 @@
\unexpanded\def\enabletextracers [#1]{\processcommalist[#1]\syst_textracers_enable }
\unexpanded\def\disabletextracers[#1]{\processcommalist[#1]\syst_textracers_disable}
-\def\syst_textracers_enable #1{\csname enabletracer#1\endcsname}
-\def\syst_textracers_disable#1{\csname disabletracer#1\endcsname}
+\def\syst_textracers_enable #1{\begincsname enabletracer#1\endcsname}
+\def\syst_textracers_disable#1{\begincsname disabletracer#1\endcsname}
% The next one is for Taco, although we can use directives as well:
\unexpanded\def\nomkivstatistics{\enabledirectives[system.nostatistics]}
+%D This is not really a tracker but for decades it lived in my \type {cont-loc}
+%D file. I moved it here because I wanted someone else to use it. This macro is not
+%D really useful for users. I kept the \LUA\ variant in \type {cont-loc.mkiv}.
+
+\installcorenamespace{profilemacrocount}
+\installcorenamespace{profilemacromacro}
+
+\newtoks\t_syst_profile
+
+\appendtoks
+ \the\t_syst_profile
+\to \everystoptext
+
+\unexpanded\def\profilemacro#1% an oldie, but modernized a bit
+ {\edef\p_name{\csstring#1}%
+ \ifcsname\??profilemacrocount\p_name\endcsname \else
+ \expandafter\newcount\csname\??profilemacrocount\p_name\endcsname
+ \expandafter\let\csname\??profilemacromacro\p_name\endcsname#1%
+ \xtoksapp\t_syst_profile
+ {\writestatus
+ {profile}%
+ {\string#1: \noexpand\the\csname\??profilemacrocount\p_name\endcsname}}%
+ \unexpanded\xdef#1%
+ {\global\advance\csname\??profilemacrocount\p_name\endcsname\plusone
+ \expandafter\noexpand\csname\??profilemacromacro\p_name\endcsname}%
+ \fi}
+
\protect \endinput