summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-23 14:21:18 +0200
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-23 14:21:18 +0200
commit940e9d28df263fba766ec8f232419091cb735cff (patch)
treeac65bd86d06c074e0c4cb438fdb9ab95ec194f10
parent6474ea3b7ce5b93eef5b33b64c7812546a4d2078 (diff)
downloadluatexbase-940e9d28df263fba766ec8f232419091cb735cff.tar.gz
Allocate attributes from 1.
-rw-r--r--Changes4
-rw-r--r--luatexbase-attr.dtx7
2 files changed, 9 insertions, 2 deletions
diff --git a/Changes b/Changes
index 8e3be94..a79e204 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Changes in the luatexbase package/bundle
+(current changes)
+ attr
+ - allocate from 1 to avoid problems with some external code
+
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
diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx
index cf310d0..dd01e01 100644
--- a/luatexbase-attr.dtx
+++ b/luatexbase-attr.dtx
@@ -288,11 +288,14 @@ See source file '\inFileName' for details.
%
% \subsection{User macros}
%
-% The allocaton macro.
+% The allocaton macro. Unlike other registers, allocate starting from 1.
+% Some code (eg, font handling coming from Con\tex{}t) behaves strangely
+% with \verb+\attribute0+ and since there is plenty of room here, it
+% doesn't seem bad to ``loose'' one item in order to avoid this problem.
%
% \begin{macrocode}
\newcount\lltxb@attribute@alloc
-\lltxb@attribute@alloc\m@ne
+\lltxb@attribute@alloc\z@
\def\newluatexattribute#1{%
\ifnum\lltxb@attribute@alloc<65535\relax
\global\advance\lltxb@attribute@alloc\@ne