summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-18 00:35:41 +0000
committerKarl Berry <karl@freefriends.org>2010-11-18 00:35:41 +0000
commit75a9ad6b597ca31c07f38850761832951b0f6224 (patch)
treed09aa23cca95f7ea69dfbd5f2683ec1869f9d0aa /Master/texmf-dist/doc/luatex
parente1353b47437cbc7c93c601670ce39cc2bfede42d (diff)
luatexbase (17nov10)
git-svn-id: svn://tug.org/texlive/trunk@20476 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/Changes30
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/README15
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/TODO48
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdfbin333424 -> 333430 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdfbin390323 -> 371582 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdfbin427408 -> 426509 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdfbin398854 -> 379396 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdfbin348362 -> 419935 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdfbin416741 -> 430199 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdfbin376886 -> 376442 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdfbin320564 -> 321844 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex24
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex24
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb-aux.tex1
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex52
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex51
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua132
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex6
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex6
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua4
20 files changed, 303 insertions, 90 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/Changes b/Master/texmf-dist/doc/luatex/luatexbase/Changes
index 2db8f802daf..d41f72290b6 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/Changes
+++ b/Master/texmf-dist/doc/luatex/luatexbase/Changes
@@ -1,7 +1,33 @@
Changes in the luatexbase package/bundle
+The [BI] tag signals backward-incompatible changes.
+Starting with v0.3, the only possible source of such changes is the upcoming
+merge with luatex.sty. Afterwards, no other BI change is to be expected.
+
+2010/10/10 v0.3
+ all not using LuaTeX results in an error (formerly a warning)
+ modutils
+ - [BI] \luatexUseModule and \luatexRequireModule replaced by
+ \RequireLuaModule with a unified syntax.
+ - [BI] luatexbase.use_module removed (use luatexbase.require_module with
+ a single argument instead).
+ - [BI] luatexbase.module_term removed.
+ - [BI] removed support for version check using a floating point
+ number, only date is supported now.
+ - module_{error,warning,info,log} now apply string.format
+ automatically
+ - date, version and description are now optional.
+ - improved formatting of messages.
+ - luatexbase.require_module now returns curstom err/war/inf functions.
+ mcb
+ - [BI] rationalise "list"-type callbacks handling. The new calling
+ convention differs from the old one only in edge cases.
+ - add user documentation
+ - misc code tuning (more locals, etc)
+
2010/10/04
- various documentation updates/fixes uploaded to CTAN
+ - various documentation updates/fixes uploaded to CTAN
+ - luatexbase.sty used to be broken on CTAN (bad docstrip)
2010/05/27 v0.2a
attr
@@ -12,7 +38,7 @@
luatexbase
- new, loads: compat,loader,regs,attr,cctb.
-Summary of backwards-incompatible interface changes between 0.1 and 0.2:
+[BI] Summary of backwards-incompatible interface changes between 0.1 and 0.2:
- Lua objects are now in table luatexbase, not luatextra.
- Lua tables tex.attributenumber and tex.catcodetablenumber are not
created any more, use their couterparts in luatexbase.
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/README b/Master/texmf-dist/doc/luatex/luatexbase/README
index f81c990bdce..44249108018 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/README
+++ b/Master/texmf-dist/doc/luatex/luatexbase/README
@@ -1,8 +1,9 @@
- The luatexbase generic bundle
+ The luatexbase generic package for LuaTeX
-The bundle provides basic facilities for LuaTeX macro programmers, mostly
-resource allocation and convenience packages. Provided are:
+This package provides resource management for the LuaTeX macro programmer.
+It is composed of the following sub-packages, which can be used independantly
+if desired:
– luatexbase-compat: compatibility helpers;
– luatexbase-loader: Lua module loading;
@@ -12,18 +13,16 @@ resource allocation and convenience packages. Provided are:
– luatexbase-modutils: Lua module declaration; and
- luatexbase-mcb: callbacks extensions.
-Additionally, a `luatexbase' package loads all of the above in one step (and
-does nothing else) for your convenience.
-
Installation
------------
Here are the recommended installation methods (preferred first).
1. If you are using TeX Live 2010 or later, use 'tlmgr install luatexbase'.
-Alternatively, try your (TeX or Linux) distribution's package management system.
+If your are using MiKTeX, use the MiKTeX Package Manager.
+Alternatively, try you Linux distribution's package management system.
-2. a. Grab luatextra.tds.zip on the CTAN.
+2. a. Grab luatexbase.tds.zip on the CTAN.
b. Unzip it at the root of one or your TDS trees.
c. You may need to update some filename database after this, see your TeX
distribution's manual for details. (Hint: with TeX Live, run 'mktexlsr';
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/TODO b/Master/texmf-dist/doc/luatex/luatexbase/TODO
index 60329a347ee..ae89fbfc3c4 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/TODO
+++ b/Master/texmf-dist/doc/luatex/luatexbase/TODO
@@ -1,30 +1,36 @@
-attr: \newluatexattribute -> \newattribute
+Version 0.3
+===========
-all: error if not running luatex!
+general
+-------
+
+- `make check` for luaotfload & fontspec (lltxb branch)
+- synchronize release
+
+
+Later
+=====
+
+all
+---
+
+- discuss merge with Heiko...
+
+- regression checks on the results of the tests (sed+diff the log)
+- add debug messages to be used in the test suite?
modutils
--------
-- Renaming:
- \luatexUseModule
- \luatexRequireModule
-- syntax of public TeX macros and Lua functions
-- create private functions for infwarrerr?
-- use tex.error for error reporting if available
-- review logic (see what LaTeX2e does)
-- General review of code and comments.
-- Update user documentation. Include template(s) for Lua modules.
-
-mcb
----
+- make `\listfiles` show Lua modules?
-- Incorporate remaining bits from luatextra?
-- Enhance test file?
-- General review of code and comments.
-- Update user documentation.
+cctb
+----
+- support for unicode-letters?
-afterwards
-----------
+bytecode registers
+------------------
-- Bump version number, upload.
+- create submodule for that
+- only lua interface, most probably
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
index 0945f79b16d..7ae3916a8a2 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf
index 57712cc5ed9..e02e405c46a 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf
index b000cbcbf14..230ab1bacb4 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf
index 8c0df231ed3..85c997aae47 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf
index ed8dba1b40a..8d7983fce53 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf
index bcbdab8cb95..dd5bd91e799 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf
index a1f96554016..ef1eb3b40f1 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf
index 49241e4cbec..f425c7d478c 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
index dbff69b2727..30a40e32f90 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
@@ -11,6 +11,7 @@
%% This work is under the CC0 license.
%% See source file 'luatexbase-cctb.dtx' for details.
%%
+\catcode00 15
\RequirePackage{luatexbase-cctb}
\begingroup \catcode64 11 \global\let\lua\luatexbase@directlua \endgroup
@@ -21,10 +22,25 @@
\newluatexcatcodetable\anothercctb
\endgroup
\lua{assert(luatexbase.catcodetables.anothercctb)}
-\luatexcatcodetable\CatcodeTableLaTeXAtLetter
-\ifnum\catcode64=11 \else \ERROR \fi
-\luatexcatcodetable\CatcodeTableLaTeX
-\ifnum\catcode64=12 \else \ERROR \fi
+\def\test#1#2#3{%
+ \begingroup
+ \ifcsname CatcodeTable#1\endcsname \else \INTERR \fi
+ \luatexcatcodetable\csname CatcodeTable#1\endcsname
+ \ifnum\catcode#2=#3 \else \ERROR \fi
+ \endgroup}
+\test {IniTeX} {00} {09}
+\test {IniTeX} {92} {00}
+\test {IniTeX} {64} {12}
+\test {IniTeX} {65} {11}
+\test {String} {92} {12}
+\test {String} {65} {12}
+\test {String} {32} {10}
+\test {Other} {92} {12}
+\test {Other} {65} {12}
+\test {Other} {32} {12}
+\test {LaTeXAtLetter} {64} {11}
+\test {LaTeX} {64} {12}
+\test {Expl} {32} {09}
\documentclass{minimal}
\lua{%
tex.sprint('\string\\setbox0=\string\\hbox{')
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex
index 5d55e1f5e41..fbd96601dfe 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex
@@ -11,6 +11,7 @@
%% This work is under the CC0 license.
%% See source file 'luatexbase-cctb.dtx' for details.
%%
+\catcode00 15
\input luatexbase-cctb.sty
\begingroup \catcode64 11 \global\let\lua\luatexbase@directlua \endgroup
@@ -21,10 +22,25 @@
\newluatexcatcodetable\anothercctb
\endgroup
\lua{assert(luatexbase.catcodetables.anothercctb)}
-\luatexcatcodetable\CatcodeTableLaTeXAtLetter
-\ifnum\catcode64=11 \else \ERROR \fi
-\luatexcatcodetable\CatcodeTableLaTeX
-\ifnum\catcode64=12 \else \ERROR \fi
+\def\test#1#2#3{%
+ \begingroup
+ \ifcsname CatcodeTable#1\endcsname \else \INTERR \fi
+ \luatexcatcodetable\csname CatcodeTable#1\endcsname
+ \ifnum\catcode#2=#3 \else \ERROR \fi
+ \endgroup}
+\test {IniTeX} {00} {09}
+\test {IniTeX} {92} {00}
+\test {IniTeX} {64} {12}
+\test {IniTeX} {65} {11}
+\test {String} {92} {12}
+\test {String} {65} {12}
+\test {String} {32} {10}
+\test {Other} {92} {12}
+\test {Other} {65} {12}
+\test {Other} {32} {12}
+\test {LaTeXAtLetter} {64} {11}
+\test {LaTeX} {64} {12}
+\test {Expl} {32} {09}
\lua{%
tex.sprint('\string\\setbox0=\string\\hbox{')
tex.sprint(luatexbase.catcodetables.string, "\string\\undef # _^&")
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-aux.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-aux.tex
new file mode 100644
index 00000000000..f5d5fef42e2
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-aux.tex
@@ -0,0 +1 @@
+\relax
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex
index be36abc6d4a..8a242cbb08b 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex
@@ -13,28 +13,38 @@
%%
\RequirePackage{luatexbase-mcb}
\catcode 64 11
-\luatexbase@directlua{
- local function one(head,...)
- texio.write_nl("I'm number 1")
- return head, true
- end
-
- local function two(head,...)
- texio.write_nl("I'm number 2")
- return head, true
- end
-
- local function three(head,...)
- texio.write_nl("I'm number 3")
- return head, true
- end
-
- luatexbase.add_to_callback("hpack_filter",one,"my sample function one",1)
- luatexbase.add_to_callback("hpack_filter",two,"my sample function two",2)
- luatexbase.add_to_callback("hpack_filter",three,"my sample function three",1)
-
- luatexbase.remove_from_callback("hpack_filter","my sample function three")
+\def\msg{\immediate\write16}
+\msg{===== BEGIN =====}
+\luatexbase@directlua{dofile('test-mcb.lua')}
+\def\test#1#2{%
+ \msg{^^J*********^^J* Testing #1 (type #2)^^J*********}
+ \msg{* Add two functions}
+ \luatexbase@directlua{add_#1()}
+ \csname test_#1\endcsname
+ \msg{* Remove one}
+ \luatexbase@directlua{rm_one_#1()}
+ \csname test_#1\endcsname
+ \msg{* Remove the second}
+ \luatexbase@directlua{rm_two_#1()}
+ \csname test_#1\endcsname
+ \msg{* Add two functions again}
+ \luatexbase@directlua{add_#1()}
+ \csname test_#1\endcsname
+ \msg{* Remove all functions}
+ \luatexbase@directlua{luatexbase.reset_callback("#1")}
+ \csname test_#1\endcsname
}
+\catcode`\_ 11
+\everypar{}
+\def\test_hpack_filter{\setbox0=\hbox{bla}}
+\def\test_hyphenate{\showhyphens{hyphenation}}
+\def\test_find_write_file{\immediate\openout15 test-mcb-out.log}
+\def\test_process_input_buffer{\input test-mcb-aux.tex}
+\test{hpack_filter}{list}
+\test{hyphenate}{simple}
+\test{find_write_file}{first}
+\test{process_input_buffer}{data}
+\msg{===== END =====}
\stop
\endinput
%%
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex
index c3f556da86a..d98dd536ec7 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex
@@ -13,28 +13,37 @@
%%
\input luatexbase-mcb.sty
\catcode 64 11
-\luatexbase@directlua{
- local function one(head,...)
- texio.write_nl("I'm number 1")
- return head, true
- end
-
- local function two(head,...)
- texio.write_nl("I'm number 2")
- return head, true
- end
-
- local function three(head,...)
- texio.write_nl("I'm number 3")
- return head, true
- end
-
- luatexbase.add_to_callback("hpack_filter",one,"my sample function one",1)
- luatexbase.add_to_callback("hpack_filter",two,"my sample function two",2)
- luatexbase.add_to_callback("hpack_filter",three,"my sample function three",1)
-
- luatexbase.remove_from_callback("hpack_filter","my sample function three")
+\def\msg{\immediate\write16}
+\msg{===== BEGIN =====}
+\luatexbase@directlua{dofile('test-mcb.lua')}
+\def\test#1#2{%
+ \msg{^^J*********^^J* Testing #1 (type #2)^^J*********}
+ \msg{* Add two functions}
+ \luatexbase@directlua{add_#1()}
+ \csname test_#1\endcsname
+ \msg{* Remove one}
+ \luatexbase@directlua{rm_one_#1()}
+ \csname test_#1\endcsname
+ \msg{* Remove the second}
+ \luatexbase@directlua{rm_two_#1()}
+ \csname test_#1\endcsname
+ \msg{* Add two functions again}
+ \luatexbase@directlua{add_#1()}
+ \csname test_#1\endcsname
+ \msg{* Remove all functions}
+ \luatexbase@directlua{luatexbase.reset_callback("#1")}
+ \csname test_#1\endcsname
}
+\catcode`\_ 11
+\def\test_hpack_filter{\setbox0=\hbox{bla}}
+\def\test_hyphenate{\showhyphens{hyphenation}}
+\def\test_find_write_file{\immediate\openout15 test-mcb-out.log}
+\def\test_process_input_buffer{\input test-mcb-aux.tex}
+\test{hpack_filter}{list}
+\test{hyphenate}{simple}
+\test{find_write_file}{first}
+\test{process_input_buffer}{data}
+\msg{===== END =====}
\bye
\endinput
%%
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua
new file mode 100644
index 00000000000..c760299d844
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua
@@ -0,0 +1,132 @@
+--
+-- This is file `test-mcb.lua',
+-- generated with the docstrip utility.
+--
+-- The original source files were:
+--
+-- luatexbase-mcb.dtx (with options: `testlua')
+--
+-- Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
+--
+-- This work is under the CC0 license.
+-- See source file 'luatexbase-mcb.dtx' for details.
+--
+local msg = texio.write_nl
+local function sample(head,...)
+ return head, true
+end
+local prio = luatexbase.priority_in_callback
+msg("\n*********\n* Testing management functions\n*********")
+luatexbase.add_to_callback("hpack_filter", sample, "sample one", 1)
+luatexbase.add_to_callback("hpack_filter", sample, "sample two", 2)
+luatexbase.add_to_callback("hpack_filter", sample, "sample three", 1)
+assert(prio("hpack_filter", "sample three"))
+luatexbase.remove_from_callback("hpack_filter", "sample three")
+assert(not prio("hpack_filter", "sample three"))
+luatexbase.reset_callback("hpack_filter")
+assert(not prio("hpack_filter", "sample one"))
+local function data_one(s)
+ texio.write_nl("I'm data 1 whith argument: "..s)
+ return s
+end
+local function data_two(s)
+ texio.write_nl("I'm data 2 whith argument: "..s)
+ return s
+end
+local function data_three(s)
+ texio.write_nl("I'm data 3 whith argument: "..s)
+ return s
+end
+msg("\n*********\n* Testing user-defined callbacks\n*********")
+msg("* create one")
+luatexbase.create_callback("fooback", "data", data_one)
+msg("* call it")
+luatexbase.call_callback("fooback", "default")
+msg("* add two functions")
+luatexbase.add_to_callback("fooback", data_two, "function two", 2)
+luatexbase.add_to_callback("fooback", data_three, "function three", 1)
+msg("* call")
+luatexbase.call_callback("fooback", "all")
+msg("* rm one function")
+luatexbase.remove_from_callback("fooback", "function three")
+msg("* call")
+luatexbase.call_callback("fooback", "all but three")
+msg("* reset")
+luatexbase.reset_callback("fooback")
+msg("* call")
+luatexbase.call_callback("fooback", "default")
+function add_hpack_filter()
+ luatexbase.add_to_callback('hpack_filter', function(head, ...)
+ texio.write_nl("I'm a dummy hpack_filter")
+ return head
+ end,
+ 'dummy hpack filter')
+ luatexbase.add_to_callback('hpack_filter', function(head, ...)
+ texio.write_nl("I'm an optimized dummy hpack_filter")
+ return true
+ end,
+ 'optimized dummy hpack filter')
+end
+function rm_one_hpack_filter()
+ luatexbase.remove_from_callback('hpack_filter', 'dummy hpack filter')
+end
+function rm_two_hpack_filter()
+ luatexbase.remove_from_callback('hpack_filter',
+ 'optimized dummy hpack filter')
+end
+function add_hyphenate()
+ luatexbase.add_to_callback('hyphenate', function(head, tail)
+ texio.write_nl("I'm a dummy hyphenate")
+ end,
+ 'dummy hyphenate')
+ luatexbase.add_to_callback('hyphenate', function(head, tail)
+ texio.write_nl("I'm an other dummy hyphenate")
+ end,
+ 'other dummy hyphenate')
+end
+function rm_one_hyphenate()
+ luatexbase.remove_from_callback('hyphenate', 'dummy hyphenate')
+end
+function rm_two_hyphenate()
+ luatexbase.remove_from_callback('hyphenate', 'other dummy hyphenate')
+end
+function add_find_write_file()
+ luatexbase.add_to_callback('find_write_file', function(id, name)
+ texio.write_nl("I'm a dummy find_write_file")
+ return "dummy-"..name
+ end,
+ 'dummy find_write_file')
+ luatexbase.add_to_callback('find_write_file', function(id, name)
+ texio.write_nl("I'm an other dummy find_write_file")
+ return "dummy-other-"..name
+ end,
+ 'other dummy find_write_file')
+end
+function rm_one_find_write_file()
+ luatexbase.remove_from_callback('find_write_file',
+ 'dummy find_write_file')
+end
+function rm_two_find_write_file()
+ luatexbase.remove_from_callback('find_write_file',
+ 'other dummy find_write_file')
+end
+function add_process_input_buffer()
+ luatexbase.add_to_callback('process_input_buffer', function(buffer)
+ return buffer.."\\msg{dummy}"
+ end,
+ 'dummy process_input_buffer')
+ luatexbase.add_to_callback('process_input_buffer', function(buffer)
+ return buffer.."\\msg{otherdummy}"
+ end,
+ 'other dummy process_input_buffer')
+end
+function rm_one_process_input_buffer()
+ luatexbase.remove_from_callback('process_input_buffer',
+ 'dummy process_input_buffer')
+end
+function rm_two_process_input_buffer()
+ luatexbase.remove_from_callback('process_input_buffer',
+ 'other dummy process_input_buffer')
+end
+--
+-- End of File `test-mcb.lua'.
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
index ece22be054b..4e583d54ac4 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
@@ -12,10 +12,8 @@
%% See source file 'luatexbase-modutils.dtx' for details.
%%
\RequirePackage{luatexbase-modutils}
-\luatexUseModule{test-modutils}
-\luatexRequireModule
-[1970/01/01]
-{test-modutils}
+\RequireLuaModule{test-modutils}
+\RequireLuaModule{test-modutils}[1970/01/01]
\stop
\endinput
%%
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
index f00ecc41b8d..9e256822c7f 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
@@ -12,10 +12,8 @@
%% See source file 'luatexbase-modutils.dtx' for details.
%%
\input luatexbase-modutils.sty
-\luatexUseModule{test-modutils}
-\luatexRequireModule
-{test-modutils}
-{1970/01/01}
+\RequireLuaModule{test-modutils}
+\RequireLuaModule{test-modutils}[1970/01/01]
\bye
\endinput
%%
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua
index 98a21e81d9c..14218185f60 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua
@@ -11,11 +11,13 @@
-- This work is under the CC0 license.
-- See source file 'luatexbase-modutils.dtx' for details.
--
-luatexbase.provides_module {
+local err, warn, info, log = luatexbase.provides_module {
name = 'test-modutils',
date = '2000/01/01',
version = 1,
description = 'dummy test package',
}
+info('It works!\nOh, rly?\nYeah rly!')
+log("I'm a one-line info.")
--
-- End of File `test-modutils.lua'.