From cf25e2f185676223b565ab5e099fcc1b83fabfa8 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 10 Apr 2013 19:10:22 +0200 Subject: fallback for earlier lualibs; move locals up in luaotfload.lua --- luaotfload.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'luaotfload.lua') diff --git a/luaotfload.lua b/luaotfload.lua index 0fba16e..c90109d 100644 --- a/luaotfload.lua +++ b/luaotfload.lua @@ -34,6 +34,13 @@ local luatexbase = luatexbase local type, next, dofile = type, next, dofile local stringfind = string.find +local add_to_callback, create_callback = + luatexbase.add_to_callback, luatexbase.create_callback +local reset_callback, call_callback = + luatexbase.reset_callback, luatexbase.call_callback + +local dummy_function = function () end + --[[doc-- No final decision has been made on how to handle font definition. At the moment, there are three candidates: The \textsf{generic} @@ -164,7 +171,6 @@ The imported font loader will call \verb|callback.register| once This is unavoidable but harmless, so we make it call a dummy instead. --doc]]-- local trapped_register = callback.register -local dummy_function = function () end callback.register = dummy_function --[[doc-- @@ -179,11 +185,6 @@ After the fontloader is ready we can restore the callback trap from callback.register = trapped_register -local add_to_callback, create_callback = - luatexbase.add_to_callback, luatexbase.create_callback -local reset_callback, call_callback = - luatexbase.reset_callback, luatexbase.call_callback - --[[doc-- We do our own callback handling with the means provided by luatexbase. @@ -208,7 +209,6 @@ loadmodule"font-clr.lua" --loadmodule"font-ovr.lua" loadmodule"font-ltx.lua" -local dummy_function = function ( ) end --- upvalue more efficient than lambda create_callback("luaotfload.patch_font", "simple", dummy_function) --[[doc-- -- cgit v1.2.3