diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-11-04 23:36:04 +0100 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-11-11 15:50:31 +0100 |
commit | a2e69144331ecc014c4e5a94128bdb2f3bf07f88 (patch) | |
tree | b4b585291c32d82d74628f8a723273c8ff28ac8d | |
parent | 7e605c5991fa640778d12e0679be7f2495a5b9a6 (diff) | |
download | luatexbase-a2e69144331ecc014c4e5a94128bdb2f3bf07f88.tar.gz |
Use new err/warn/inf facility.
-rw-r--r-- | luatexbase-mcb.dtx | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx index 0724a90..c07296e 100644 --- a/luatexbase-mcb.dtx +++ b/luatexbase-mcb.dtx @@ -302,7 +302,7 @@ See source file '\inFileName' for details. % % \begin{macrocode} module('luatexbase', package.seeall) -luatexbase.provides_module({ +local err, warning, info = luatexbase.provides_module({ name = "luamcallbacks", version = 0.2, date = "2010/05/12", @@ -313,23 +313,6 @@ luatexbase.provides_module({ }) % \end{macrocode} % -% Shortcuts for error functions. -% -% \begin{macrocode} -local log = log or function(...) - luatexbase.module_log('luamcallbacks', string.format(...)) -end -local info = info or function(...) - luatexbase.module_info('luamcallbacks', string.format(...)) -end -local warning = warning or function(...) - luatexbase.module_warning('luamcallbacks', string.format(...)) -end -local err = err or function(...) - luatexbase.module_error('luamcallbacks', string.format(...)) -end -% \end{macrocode} -% % \subsubsection{Initialisations} % % \texttt{callbacklist} is the main list, that contains the callbacks as @@ -620,7 +603,7 @@ function add_to_callback (name,func,description,priority) .."only the first function will be active.", name) end table.insert(l,priority,f) - log("inserting function '%s' at position %s in callback list for '%s'", + info("inserting function '%s' at position %s in callback list for '%s'", description, priority, name) end % \end{macrocode} @@ -653,7 +636,7 @@ function remove_from_callback (name, description) for k,v in ipairs(l) do if v.description == description then table.remove(l,k) - log("removing function '%s' from '%s'",description,name) + info("removing function '%s' from '%s'",description,name) if not next(l) then callbacklist[name] = nil if not lua_callbacks_defaults[name] then @@ -683,7 +666,7 @@ function reset_callback (name) end local l = callbacklist[name] if l then - log("resetting callback list '%s'",name) + info("resetting callback list '%s'",name) callbacklist[name] = nil end end |