summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-12 09:34:58 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-12 09:34:58 +0200
commit37823d6e677ae4048a9f6e6fc69d49cb2c9b53ad (patch)
tree576e2e8af8517cfaee883e29426d0cd85f347a05
parentc0466d132f77225a13d71f69492b6dfb56ef7e11 (diff)
downloadluatexbase-37823d6e677ae4048a9f6e6fc69d49cb2c9b53ad.tar.gz
Adapting to Lua 5.2 a better way
-rw-r--r--luatexbase-loader.dtx13
1 files changed, 4 insertions, 9 deletions
diff --git a/luatexbase-loader.dtx b/luatexbase-loader.dtx
index 92e97b2..b7d3a5f 100644
--- a/luatexbase-loader.dtx
+++ b/luatexbase-loader.dtx
@@ -379,11 +379,10 @@ end
%
% \begin{macrocode}
local package_loader_two
-if package.searchers then
- package_loader_two = package.searchers[2]
-else
- package_loader_two = package.loaders[2]
+if not package.searchers then
+ package.searchers = package.loaders
end
+package_loader_two = package.searchers[2]
local function load_module(mod)
local file = find_module_file(mod)
if not file then
@@ -409,11 +408,7 @@ end
% Finally install this combined loader as loader 2.
%
% \begin{macrocode}
-if package.searchers then
- package.searchers[2] = load_module
-else
- package.loaders[2] = load_module
-end
+package.searchers[2] = load_module
%</luamodule>
% \end{macrocode}
%