trac-tex.mkxl /size: 2157 b    last modification: 2023-12-21 09:44
1%D \module
2%D   [       file=trac-tex,
3%D        version=2009.07.20,
4%D          title=\CONTEXT\ Tracking Macros,
5%D       subtitle=\TEX,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Tracking Macros / TeX}
15
16\registerctxluafile{trac-tex}{autosuffix}
17
18%D All tracing flags at the \TEX\ end will be redone this way so
19%D that we have a similar mechanism for \TEX\ and \LUA. Also, the
20%D currently used if's might become conditionals.
21
22\unprotect
23
24% \def\enabletextracerwhatever {...}
25% \def\disabletextracerwhatever{...}
26
27\mutable\lettonothing\alltextracers % so that we can report available tracers
28
29\permanent\protected\def\installtextracer#1%
30  {\addtocommalist{#1}\alltextracers}
31
32\permanent\protected\def\enabletextracers [#1]{\processcommalist[#1]\syst_textracers_enable }
33\permanent\protected\def\disabletextracers[#1]{\processcommalist[#1]\syst_textracers_disable}
34
35\def\syst_textracers_enable #1{\begincsname  enabletracer#1\endcsname}
36\def\syst_textracers_disable#1{\begincsname disabletracer#1\endcsname}
37
38%D The next one is for Taco, although we can use directives as well which is the
39%D preferred way!
40
41\permanent\protected\def\nomkivstatistics{\enabledirectives[system.nostatistics]}
42
43%D Finally this one got moved from cont-exp to here (replacing the old one):
44
45\installcorenamespace{profilemacro}
46
47\permanent\protected\def\profilemacro#1% an oldie, but modernized a bit
48  {\edef\p_name{\csstring#1}%
49   \ifcsname\??profilemacro\p_name\endcsname \else
50     \aliased\letcsname\??profilemacro\p_name\endcsname#1%
51   % \enforced\protected\xdef#1%
52     \untraced\enforced\ifflags#1\protected\protected\fi\xdef#1%
53       {\noexpand\clf_profilemacro\noexpand#1%
54        \expandafter\noexpand\csname\??profilemacro\p_name\endcsname}%
55   \fi}
56
57% \appendtoks
58%     {\appendtoks\showprofiledmacros\to\everystoptext}%
59% \to \everydump
60
61\appendtoks
62    \showprofiledmacros
63\to \everystoptext
64
65\protect \endinput
66