summaryrefslogtreecommitdiff
path: root/tex/context/base/trac-tra.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-01-19 23:29:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-01-19 23:29:00 +0100
commit6591e18e59fb54ae285d1a95ea74fc9101c00af8 (patch)
tree63572f93283e7615dafc41427b8f2d8b26a5bb2c /tex/context/base/trac-tra.lua
parente1cd565bd3872eb5665b95a0ca93e9ba6982c929 (diff)
downloadcontext-6591e18e59fb54ae285d1a95ea74fc9101c00af8.tar.gz
beta 2010.01.19 23:29
Diffstat (limited to 'tex/context/base/trac-tra.lua')
-rw-r--r--tex/context/base/trac-tra.lua21
1 files changed, 18 insertions, 3 deletions
diff --git a/tex/context/base/trac-tra.lua b/tex/context/base/trac-tra.lua
index 63ce4233f..b6598484e 100644
--- a/tex/context/base/trac-tra.lua
+++ b/tex/context/base/trac-tra.lua
@@ -294,13 +294,15 @@ function setters.new(name)
return t
end
-trackers = setters.new("trackers")
-directives = setters.new("directives")
+trackers = setters.new("trackers")
+directives = setters.new("directives")
+experiments = setters.new("experiments")
-- nice trick: we overload two of the directives related functions with variants that
-- do tracing (itself using a tracker) .. proof of concept
-local trace_directives = false local trace_directives = false trackers.register("system.directives", function(v) trace_directives = v end)
+local trace_directives = false local trace_directives = false trackers.register("system.directives", function(v) trace_directives = v end)
+local trace_experiments = false local trace_experiments = false trackers.register("system.experiments", function(v) trace_experiments = v end)
local e = directives.enable
local d = directives.disable
@@ -314,3 +316,16 @@ function directives.disable(...)
commands.writestatus("directives","disabling: %s",concat({...}," "))
d(...)
end
+
+local e = experiments.enable
+local d = experiments.disable
+
+function experiments.enable(...)
+ commands.writestatus("experiments","enabling: %s",concat({...}," "))
+ e(...)
+end
+
+function experiments.disable(...)
+ commands.writestatus("experiments","disabling: %s",concat({...}," "))
+ d(...)
+end