From b1d691809f3556327b45caf09444c50a77335b8f Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 12 Jul 2013 20:20:46 +0300 Subject: beta 2013.07.12 19:10 --- tex/context/base/luat-env.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tex/context/base/luat-env.lua') diff --git a/tex/context/base/luat-env.lua b/tex/context/base/luat-env.lua index 8753972c6..5558e0303 100644 --- a/tex/context/base/luat-env.lua +++ b/tex/context/base/luat-env.lua @@ -20,6 +20,8 @@ local report_lua = logs.reporter("resolvers","lua") local luautilities = utilities.lua local luasuffixes = luautilities.suffixes +local texgettoks = tex and tex.gettoks + environment = environment or { } local environment = environment @@ -28,7 +30,7 @@ local environment = environment local mt = { __index = function(_,k) if k == "version" then - local version = tex.toks and tex.toks.contextversiontoks + local version = texgettoks and texgettoks("contextversiontoks") if version and version ~= "" then rawset(environment,"version",version) return version @@ -36,7 +38,7 @@ local mt = { return "unknown" end elseif k == "kind" then - local kind = tex.toks and tex.toks.contextkindtoks + local kind = texgettoks and texgettoks("contextkindtoks") if kind and kind ~= "" then rawset(environment,"kind",kind) return kind -- cgit v1.2.3