summaryrefslogtreecommitdiff
path: root/tex/context/base/core-env.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-02-07 00:57:00 +0100
committerHans Hagen <pragma@wxs.nl>2014-02-07 00:57:00 +0100
commitb1d9ab946dc387c58a5575a360754fa04ebcad42 (patch)
treec24d14ddd03c9d3a07ff07ab0aa892a4a383de16 /tex/context/base/core-env.lua
parent75187f49bdc208a3cdc86bbaf701d7cf409869a7 (diff)
downloadcontext-b1d9ab946dc387c58a5575a360754fa04ebcad42.tar.gz
beta 2014.02.07 00:57
Diffstat (limited to 'tex/context/base/core-env.lua')
-rw-r--r--tex/context/base/core-env.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/tex/context/base/core-env.lua b/tex/context/base/core-env.lua
index 8cbc93038..2cc84299b 100644
--- a/tex/context/base/core-env.lua
+++ b/tex/context/base/core-env.lua
@@ -31,6 +31,7 @@ tex.systemmodes = allocate { }
tex.constants = allocate { }
tex.conditionals = allocate { }
tex.ifs = allocate { }
+tex.isdefined = allocate { }
local modes = { }
local systemmodes = { }
@@ -78,6 +79,10 @@ setmetatableindex(tex.ifs, function(t,k)
return csname_id(k) ~= undefined and create(k)[2] == iftrue -- inefficient, this create, we need a helper
end)
+setmetatableindex(tex.isdefined, function(t,k)
+ return csname_id(k) ~= undefined
+end)
+
function context.setconditional(name,value)
if value then
context.settruevalue(name)