summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes10
-rw-r--r--TODO2
-rw-r--r--luatexbase-modutils.dtx19
3 files changed, 20 insertions, 11 deletions
diff --git a/Changes b/Changes
index 2db8f80..ac5798f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,15 @@
Changes in the luatexbase package/bundle
+
+(current changes)
+ attr
+ - Name changes: \*luatexattribute -> \*attribute.
+ modutils
+ - \luatexUseModule and \luatexRequireModule replaced by
+ \RequireLuaModule with a unified syntax.
+ - luatexbase.use_module removed (use luatexbase.require_module with
+ a single argument instead).
+
2010/10/04
various documentation updates/fixes uploaded to CTAN
diff --git a/TODO b/TODO
index c8f9f32..64a1c18 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,8 @@
modutils
--------
-- syntax of public TeX macros and Lua functions
- create private functions for infwarrerr?
+- use LaTeX style linebreaks in messages?
- review logic: should this module be mandatory?
if not, what should happen with mixed require(), require_module(),
diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx
index 9e1ebb5..95e4611 100644
--- a/luatexbase-modutils.dtx
+++ b/luatexbase-modutils.dtx
@@ -169,14 +169,12 @@ See source file '\inFileName' for details.
%
% \subsection{Lua functions}
%
-% The main functions are |luatexbase.require_module| and
-% |luatexbase.use_module| which may be used as a replacement to |require()|.
-% The only difference between these functions is, |require_module| accepts a
-% second, optional argument in order to specify a minimal version. They do the
-% same as |require()| but also make sure the module loaded correctly
-% identifies itself with the name given, and its version is greater than the
-% minimal version required. The version can be given either as a (floating
-% point) number or as a date in YYYY/MM/DD format.
+% The main function is |luatexbase.require_module| which may be used as a
+% replacement to |require()|, but also checks that the module correctly
+% identified itself, and accepts a second, optional argument containing
+% version information to be checked against the similar information provided
+% by the loaded module. The version can be given either as a (floating point)
+% number or as a date in YYYY/MM/DD format.
%
% Modules identify themselves using |luatexbase.provides_module|, whose only
% argument is a table with some information about the module. The mandatory
@@ -466,7 +464,7 @@ local function warn(...) module_warning('luatexbase.modutils', ...) end
% Load a module without version checking.
%
% \begin{macrocode}
-function use_module(name)
+local function use_module(name)
require(name)
if not modules[name] then
warn("Module didn't properly identified itself: %s", name)
@@ -479,7 +477,8 @@ end
% \begin{macrocode}
function require_module(name, version)
if not version then
- return use_module(name)
+ use_module(name)
+ return
end
luaversion = parse_version(version)
if modules[name] then