summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-11-05 19:58:53 +0100
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-11-11 15:52:24 +0100
commit20f77aee154fabe58c713da5964064778f65dce9 (patch)
tree4e640c3f0c5f8d8eacb99aa2fbd98511eaa19dc0
parent29c7784fd4ddd1bf20628f077992be125ec9d014 (diff)
downloadluatexbase-20f77aee154fabe58c713da5964064778f65dce9.tar.gz
s/ifelse/table lookup/ part 2
-rw-r--r--luatexbase-mcb.dtx12
1 files changed, 1 insertions, 11 deletions
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx
index 43bfef9..c0d8c58 100644
--- a/luatexbase-mcb.dtx
+++ b/luatexbase-mcb.dtx
@@ -640,17 +640,7 @@ function add_to_callback (name,func,description,priority)
l = {}
callbacklist[name] = l
if not lua_callbacks_defaults[name] then
- if callbacktypes[name] == list then
- internalregister(name, listhandler(name))
- elseif callbacktypes[name] == data then
- internalregister(name, datahandler(name))
- elseif callbacktypes[name] == simple then
- internalregister(name, simplehandler(name))
- elseif callbacktypes[name] == first then
- internalregister(name, firsthandler(name))
- else
- err("unknown callback type")
- end
+ internalregister(name, handlers[callbacktypes[name]](name))
end
end
% \end{macrocode}