diff options
Diffstat (limited to 'luatexbase-mcb.dtx')
-rw-r--r-- | luatexbase-mcb.dtx | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx index 6f1b1a6..f4d6448 100644 --- a/luatexbase-mcb.dtx +++ b/luatexbase-mcb.dtx @@ -2,6 +2,7 @@ % % Copyright 2009, 2010 by Élie Roux <elie.roux@telecom-bretagne.eu> % Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr> +% Copyright 2013 by Philipp Gesang <philipp.gesang@alumni.uni-heidelberg.de> % % This work is under the CC0 license. % @@ -114,7 +115,7 @@ See the aforementioned source file(s) for copyright and licensing information. % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% \pkdate{luatexbase-mcb}{2011/05/24 v0.4} +% \pkdate{luatexbase-mcb}{2013/04/13 v0.5} % % \maketitle % @@ -331,7 +332,7 @@ See the aforementioned source file(s) for copyright and licensing information. \let\x\ProvidesPackage \fi \expandafter\endgroup -\x{luatexbase-mcb}[2011/05/24 v0.4 Callback management for LuaTeX] +\x{luatexbase-mcb}[2013/04/13 v0.5 Callback management for LuaTeX] % \end{macrocode} % % Make sure \luatex is used. @@ -392,13 +393,13 @@ See the aforementioned source file(s) for copyright and licensing information. % % \begin{macrocode} module('luatexbase', package.seeall) -local err, warning, info = luatexbase.provides_module({ +local err, warning, info, log = luatexbase.provides_module({ name = "luatexbase-mcb", - version = 0.4, - date = "2011/05/24", + version = 0.5, + date = "2013/04/13", description = "register several functions in a callback", - author = "Hans Hagen, Elie Roux and Manuel Pegourie-Gonnard", - copyright = "Hans Hagen, Elie Roux and Manuel Pegourie-Gonnard", + author = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang", + copyright = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang", license = "CC0", }) % \end{macrocode} @@ -686,7 +687,7 @@ function add_to_callback (name,func,description,priority) warning("several functions in '%s',\n" .."only one will be active.", name) end - info("inserting '%s'\nat position %s in '%s'", + log("inserting '%s'\nat position %s in '%s'", description, priority, name) end % \end{macrocode} @@ -732,8 +733,8 @@ function remove_from_callback (name, description) return end table.remove(l, index) - info("removing '%s'\nfrom '%s'", description, name) - if table.maxn(l) == 0 then + log("removing '%s'\nfrom '%s'", description, name) + if #l == 0 then callbacklist[name] = nil if not lua_callbacks_defaults[name] then register_callback(name, nil) @@ -755,11 +756,11 @@ function reset_callback (name, make_false) err("unable to reset '%s':\nis not a valid callback", name) return end - info("resetting callback '%s'", name) + log("resetting callback '%s'", name) callbacklist[name] = nil if not lua_callbacks_defaults[name] then if make_false == true then - info("setting '%s' to false", name) + log("setting '%s' to false", name) register_callback(name, false) else register_callback(name, nil) @@ -822,7 +823,7 @@ function create_callback(name, ctype, default) err("unable to create callback '%s':\ntype '%s' undefined", name, ctype) return nil end - info("creating '%s' type %s", name, ctype) + log("creating '%s' type %s", name, ctype) lua_callbacks_defaults[name] = default callbacktypes[name] = ctype end |