summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-19 20:59:22 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-19 20:59:22 +0200
commit89aaa92df44af21be14c32fa7425b1cfa0674820 (patch)
tree4bb43075b76e2d03f853cf5c1b97a25c63179504 /luaotfload.dtx
parent80e5042a10620dbb2c456cf5d3a472c66fe6a90f (diff)
downloadluaotfload-89aaa92df44af21be14c32fa7425b1cfa0674820.tar.gz
Stop using module() in luaotfload.lua
These _G are a bit ugly...
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx18
1 files changed, 6 insertions, 12 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index e36bb36..22afb45 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -822,7 +822,7 @@ and the derived files
%<*lua>
% \fi
% \begin{macrocode}
-module("luaotfload", package.seeall)
+luaotfload = luaotfload or {}
luaotfload.module = {
name = "luaotfload",
@@ -1019,15 +1019,9 @@ end
% \identifier{luatexbase}-style callback handling here.
%
% \begin{macrocode}
-if not _G. generic_context then _G. generic_context = { } end
-if not _G.non_generic_context then _G.non_generic_context = { } end
+generic_context = {no_callbacks_yet = true}
-local generic_context = generic_context
-local non_generic_context =non_generic_context
-
-generic_context.no_callbacks_yet = true
-
-_G.non_generic_context = { luatex_fonts = {
+non_generic_context = { luatex_fonts = {
load_before = "otfl-fonts-merged.lua",
-- load_after = nil, --- TODO, this is meant for callbacks
skip_loading = true,
@@ -1055,7 +1049,7 @@ callback.register = dummy_function
local dummylogfunction=function() end
local dummylogreporter=function(c) return function(...) log(string.formatters(...)) end end
-_G.logs={
+logs={
new=dummylogreporter,
reporter=dummylogreporter,
messenger=dummylogreporter,
@@ -1091,9 +1085,9 @@ do
local new_attribute = luatexbase.new_attribute
local the_attributes = luatexbase.attributes
- _G.attributes = _G.attributes or { }
+ attributes = attributes or { }
- _G.attributes.private = function (name)
+ attributes.private = function (name)
local attr = "otfl@" .. name
local number = the_attributes[attr]
if not number then