summaryrefslogtreecommitdiff
path: root/luatexbase-mcb.dtx
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-05-04 07:54:34 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-05-04 07:54:34 -0700
commitf848294da11121e5a1943e22055265266f6aff66 (patch)
treeb6ef6c9195c580bcf24205cb54138578f092e697 /luatexbase-mcb.dtx
parenta6304a289d09c1ae37cfcb0233b0eecbb66db6d8 (diff)
parente379d438d1903a0dbc1fab0fd82bf9e520c4b27a (diff)
downloadluatexbase-f848294da11121e5a1943e22055265266f6aff66.tar.gz
Merge pull request #6 from lualatex/master
Sync with latest lualatex
Diffstat (limited to 'luatexbase-mcb.dtx')
-rw-r--r--luatexbase-mcb.dtx20
1 files changed, 19 insertions, 1 deletions
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx
index f4d6448..0c04d4d 100644
--- a/luatexbase-mcb.dtx
+++ b/luatexbase-mcb.dtx
@@ -392,7 +392,8 @@ See the aforementioned source file(s) for copyright and licensing information.
% \subsubsection{Module identification}
%
% \begin{macrocode}
-module('luatexbase', package.seeall)
+luatexbase = luatexbase or { }
+local luatexbase = luatexbase
local err, warning, info, log = luatexbase.provides_module({
name = "luatexbase-mcb",
version = 0.5,
@@ -404,6 +405,17 @@ local err, warning, info, log = luatexbase.provides_module({
})
% \end{macrocode}
%
+% First we declare the function references for the entire scope.
+%
+% \begin{macrocode}
+local add_to_callback
+local call_callback
+local create_callback
+local priority_in_callback
+local remove_from_callback
+local reset_callback
+% \end{macrocode}
+%
% \subsubsection{Housekeeping}
%
% The main table: keys are callback names, and values are the associated
@@ -690,6 +702,7 @@ function add_to_callback (name,func,description,priority)
log("inserting '%s'\nat position %s in '%s'",
description, priority, name)
end
+luatexbase.add_to_callback = add_to_callback
% \end{macrocode}
%
% Remove a function from a callback. First check arguments.
@@ -742,6 +755,7 @@ function remove_from_callback (name, description)
end
return
end
+luatexbase.remove_from_callback = remove_from_callback
% \end{macrocode}
%
% Remove all the functions registered in a callback. Unregisters the
@@ -767,6 +781,7 @@ function reset_callback (name, make_false)
end
end
end
+luatexbase.reset_callback = reset_callback
% \end{macrocode}
%
% Get a function's priority in a callback list, or false if the function is
@@ -788,6 +803,7 @@ function priority_in_callback (name, description)
end
return false
end
+luatexbase.priority_in_callback = priority_in_callback
% \end{macrocode}
%
% \subsubsection{Public functions for user-defined callbacks}
@@ -827,6 +843,7 @@ function create_callback(name, ctype, default)
lua_callbacks_defaults[name] = default
callbacktypes[name] = ctype
end
+luatexbase.create_callback = create_callback
% \end{macrocode}
%
% This function calls a callback. It can only call a callback created by
@@ -855,6 +872,7 @@ function call_callback(name, ...)
end
return f(...)
end
+luatexbase.call_callback = call_callback
% \end{macrocode}
%
% That's all folks!