Hello Ralf and all,

when committing text written by Romain Lenglet, I inserted

| @ovindex ERLANG_INSTALL_LIB_DIR
| @acindex ERLANG_SUBST_INSTALL_LIB_DIR

to autoconf.texi.

Ralf, you reported that texi2dvi loops endlessly on the second of these
two lines.  But the explanation is different than the one you wrote:

[EMAIL PROTECTED]' is a Texinfo primitive.
(Well, kind of, it is actually created by [EMAIL PROTECTED] ov'.)

OTOH, [EMAIL PROTECTED]' is a @macro, defined at the top of autoconf.texi.

The parameter list given to the user-macros shall be enclosed in braces:
| @foo{prm1, prm2, prm3}

So the line is question was actually incorrect, it should have been:

| @acindex{ERLANG_SUBST_INSTALL_LIB_DIR}

I have fixed this in the Autoconf CVS, see the patch attached below.

But the story continues:
Why the endless loop?  If the user macro takes exactly one parameter,
there is an alternative way to call it, when the parameter spand to the
end of the line
| @foo parameter

But no one uses this, so no one noticed when I broke that feature a few
years ago.  I introduced a conflict between macros \braceorline and
\parsearg: they both used \next as temporary storage.

I have fixed that problem in the Texinfo CVS; see the attached patch.

Have a nice day,
        Stepan
2006-03-21  Stepan Kasal  <[EMAIL PROTECTED]>

        * doc/texinfo.tex (\parseargusing, \finishparsearg): Use \argtorun
          instead of \next.
        (\argcheckspacesY): Change the wording of the comment about \next.
        (\braceorline, \braceorlinexxx): Do not suppose that \next is
          preserved during the run of \parsearg, anyway.

Index: doc/texinfo.tex
===================================================================
RCS file: /cvsroot/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.210
diff -u -r1.210 texinfo.tex
--- doc/texinfo.tex     14 Mar 2006 23:12:17 -0000      1.210
+++ doc/texinfo.tex     21 Mar 2006 18:43:21 -0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2006-02-13.16}
+\def\texinfoversion{2006-03-21.13}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@@ -385,7 +385,7 @@
 %
 \def\parsearg{\parseargusing{}}
 \def\parseargusing#1#2{%
-  \def\next{#2}%
+  \def\argtorun{#2}%
   \begingroup
     \obeylines
     \spaceisspace
@@ -416,8 +416,7 @@
 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
   \def\temp{#3}%
   \ifx\temp\empty
-    % We cannot use \next here, as it holds the macro to run;
-    % thus we reuse \temp.
+    % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
     \let\temp\finishparsearg
   \else
     \let\temp\argcheckspaces
@@ -429,14 +428,14 @@
 % If a _delimited_ argument is enclosed in braces, they get stripped; so
 % to get _exactly_ the rest of the line, we had to prevent such situation.
 % We prepended an \empty token at the very beginning and we expand it now,
-% just before passing the control to \next.
+% just before passing the control to \argtorun.
 % (Similarily, we have to think about #3 of \argcheckspacesY above: it is
 % either the null string, or it ends with \^^M---thus there is no danger
 % that a pair of braces would be stripped.
 %
 % But first, we have to remove the trailing space token.
 %
-\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
 
 % \parseargdef\foo{...}
 %      is roughly equivalent to
@@ -5928,11 +5927,11 @@
 % {.  If so it reads up to the closing }, if not, it reads the whole
 % line.  Whatever was read is then fed to the next control sequence
 % as an argument (by \parsebrace or \parsearg)
-\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup\else
     \expandafter\parsearg
-  \fi \next}
+  \fi \macnamexxx}
 
 
 % @alias.
2006-03-21  Stepan Kasal  <[EMAIL PROTECTED]>

        * doc/autoconf.texi (Installation Directory Variables): Fix typo.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.970
diff -u -r1.970 autoconf.texi
--- doc/autoconf.texi   20 Mar 2006 20:28:56 -0000      1.970
+++ doc/autoconf.texi   21 Mar 2006 21:45:07 -0000
@@ -2557,7 +2557,7 @@
 
 @defvar ERLANG_INSTALL_LIB_DIR
 @ovindex ERLANG_INSTALL_LIB_DIR
[EMAIL PROTECTED] ERLANG_SUBST_INSTALL_LIB_DIR
[EMAIL PROTECTED]
 The common parent directory of Erlang library installation directories.
 This variable is set by calling the @code{AC_ERLANG_SUBST_INSTALL_LIB_DIR}
 macro in @file{configure.ac}.
@@ -2565,7 +2565,7 @@
 
 @defvar [EMAIL PROTECTED]
 @ovindex [EMAIL PROTECTED]
[EMAIL PROTECTED] ERLANG_SUBST_INSTALL_LIB_SUBDIR
[EMAIL PROTECTED]
 The installation directory for Erlang library @var{library}.
 This variable is set by calling the
 @samp{AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(@var{library}, @var{version}}
_______________________________________________
Texinfo home page: http://www.gnu.org/software/texinfo/
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-texinfo

Reply via email to