summaryrefslogtreecommitdiff
path: root/luatexbase-mcb.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'luatexbase-mcb.dtx')
-rw-r--r--luatexbase-mcb.dtx42
1 files changed, 21 insertions, 21 deletions
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx
index c07296e..770097c 100644
--- a/luatexbase-mcb.dtx
+++ b/luatexbase-mcb.dtx
@@ -466,7 +466,7 @@ function listhandler (name)
head = rtv2
end
if done == false then
- err("function \"%s\" returned false in callback '%s'",
+ err("function '%s' returned false\nin callback '%s'",
f.description, name)
end
end
@@ -551,23 +551,23 @@ end
% \begin{macrocode}
function add_to_callback (name,func,description,priority)
if type(func) ~= "function" then
- err("unable to add function, no proper function passed")
+ err("unable to add function:\nno proper function passed")
return
end
if not name or name == "" then
- err("unable to add function, no proper callback name passed")
+ err("unable to add function:\nno proper callback name passed")
return
elseif not callbacktypes[name] then
- err("unable to add function, '%s' is not a valid callback", name)
+ err("unable to add function:\n'%s' is not a valid callback", name)
return
end
if not description or description == "" then
- err("unable to add function to '%s', no proper description passed",
+ err("unable to add function to '%s':\nno proper description passed",
name)
return
end
if priority_in_callback(name, description) ~= 0 then
- warning("function '%s' already registered in callback '%s'",
+ warning("function '%s' already registered\nin callback '%s'",
description, name)
end
local l = callbacklist[name]
@@ -599,11 +599,11 @@ function add_to_callback (name,func,description,priority)
priority = 1
end
if callbacktypes[name] == first and (priority ~= 1 or #l ~= 0) then
- warning("several callbacks registered in callback '%s', "
+ warning("several callbacks registered in callback '%s',\n"
.."only the first function will be active.", name)
end
table.insert(l,priority,f)
- info("inserting function '%s' at position %s in callback list for '%s'",
+ info("inserting function '%s'\nat position %s in callback list\nfor '%s'",
description, priority, name)
end
% \end{macrocode}
@@ -616,15 +616,15 @@ end
% \begin{macrocode}
function remove_from_callback (name, description)
if not name or name == "" then
- err("unable to remove function, no proper callback name passed")
+ err("unable to remove function:\nno proper callback name passed")
return
elseif not callbacktypes[name] then
- err("unable to remove function, '%s' is not a valid callback", name)
+ err("unable to remove function:\n'%s' is not a valid callback", name)
return
end
if not description or description == "" then
err(
- "unable to remove function from '%s', no proper description passed",
+ "unable to remove function from '%s':\nno proper description passed",
name)
return
end
@@ -636,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)
- info("removing function '%s' from '%s'",description,name)
+ info("removing function '%s'\nfrom '%s'",description,name)
if not next(l) then
callbacklist[name] = nil
if not lua_callbacks_defaults[name] then
@@ -646,7 +646,7 @@ function remove_from_callback (name, description)
return
end
end
- warning("unable to remove function '%s' from '%s'",description,name)
+ warning("unable to remove function '%s'\nfrom '%s'",description,name)
end
% \end{macrocode}
%
@@ -655,10 +655,10 @@ end
% \begin{macrocode}
function reset_callback (name)
if not name or name == "" then
- err("unable to reset, no proper callback name passed")
+ err("unable to reset:\nno proper callback name passed")
return
elseif not callbacktypes[name] then
- err("reset error, '%s' is not a valid callback", name)
+ err("reset error: '%s'\nis not a valid callback", name)
return
end
if not lua_callbacks_defaults[name] then
@@ -686,21 +686,21 @@ end
% \begin{macrocode}
function create_callback(name, ctype, default)
if not name then
- err("unable to call callback, no proper name passed", name)
+ err("unable to call callback:\nno proper name passed", name)
return nil
end
if not ctype or not default then
- err("unable to create callback '%s': "
+ err("unable to create callback '%s':\n"
.."callbacktype or default function not specified", name)
return nil
end
if callbacktypes[name] then
- err("unable to create callback '%s', callback already exists", name)
+ err("unable to create callback '%s':\ncallback already exists", name)
return nil
end
local temp = str_to_type(ctype)
if not temp then
- err("unable to create callback '%s', type '%s' undefined", name, ctype)
+ err("unable to create callback '%s':\ntype '%s' undefined", name, ctype)
return nil
end
ctype = temp
@@ -715,11 +715,11 @@ end
% \begin{macrocode}
function call_callback(name, ...)
if not name then
- err("unable to call callback, no proper name passed", name)
+ err("unable to call callback:\nno proper name passed", name)
return nil
end
if not lua_callbacks_defaults[name] then
- err("unable to call lua callback '%s', unknown callback", name)
+ err("unable to call lua callback '%s':\nunknown callback", name)
return nil
end
local l = callbacklist[name]