From 4e0ad8a9c1a87477a1a4c2dad218c29c51123bab Mon Sep 17 00:00:00 2001
From: Elie Roux <eroux@dedibox.ebzao.info>
Date: Tue, 19 Jan 2010 13:56:20 +0100
Subject: Using require() in texlua toO

---
 luaextra.dtx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'luaextra.dtx')

diff --git a/luaextra.dtx b/luaextra.dtx
index b74bb26..61fc1f5 100644
--- a/luaextra.dtx
+++ b/luaextra.dtx
@@ -198,9 +198,8 @@ kpse.set_program_name("luatex")
 local function load_luaextra_module(filename)
     local path = kpse.find_file(filename)
     texio.write_nl('log', string.format("luaextra: loading file %s", path))
-    if tex and tex.luatexversion and tex.luatexversion > 44 then 
-        -- this means that by default we use old-style loading for texlua,
-        -- as the tex table is not available.
+    if (tex and tex.luatexversion and tex.luatexversion > 44)
+        or (status and status.luatex_version and status.luatex_version > 44) then
         require(filename)
     else
         dofile(kpse.find_file(filename))
-- 
cgit v1.2.3

