From c322f8ffe3b02f2dc5ee929d5b5c603674b80be4 Mon Sep 17 00:00:00 2001
From: Khaled Hosny <khaledhosny@eglug.org>
Date: Sun, 9 Oct 2011 08:06:18 +0200
Subject: Make silly cosmetics + actually making it work.

---
 luaotfload.dtx | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

(limited to 'luaotfload.dtx')

diff --git a/luaotfload.dtx b/luaotfload.dtx
index a7f82de..11ce7f4 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -569,26 +569,15 @@ fonts.mode = "node"
 caches.compilemethod = "both"
 %    \end{macrocode}
 %
-%    Finally we register the callbacks
-%
-%    \begin{macrocode}
-local handler = nodes.simple_font_handler
-luatexbase.add_to_callback("pre_linebreak_filter", handler, "luaotfload")
-luatexbase.add_to_callback("hpack_filter",         handler, "luaotfload")
-luatexbase.reset_callback("define_font")
-luatexbase.add_to_callback("define_font",       definefont, "luaotfload")
-%    \end{macrocode}
-%
-% \section{Font patching callback}
-%
 %    we provide a callback for patching fonts on the fly, to be used by other
 %    packages.
+%
 %    \begin{macrocode}
 luatexbase.create_callback("luaotfload.patch_font", "simple", function() end)
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-local function definefont(...)
+local function deffont(...)
     local fontdata = fonts.definers.read(...)
     if type(fontdata) == "table" then
         luatexbase.call_callback("luaotfload.patch_font", fontdata)
@@ -597,6 +586,16 @@ local function definefont(...)
 end
 %    \end{macrocode}
 %
+%    Finally we register the callbacks
+%
+%    \begin{macrocode}
+local handler = nodes.simple_font_handler
+luatexbase.reset_callback("define_font")
+luatexbase.add_to_callback("pre_linebreak_filter", handler, "luaotfload")
+luatexbase.add_to_callback("hpack_filter",         handler, "luaotfload")
+luatexbase.add_to_callback("define_font",          deffont, "luaotfload")
+%    \end{macrocode}
+%
 % \iffalse
 %</lua>
 % \fi
-- 
cgit v1.2.3

