[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7119] address@hidden in macro expansion
From: |
Gavin D. Smith |
Subject: |
[7119] address@hidden in macro expansion |
Date: |
Thu, 14 Apr 2016 06:29:13 +0000 |
Revision: 7119
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7119
Author: gavin
Date: 2016-04-14 06:29:11 +0000 (Thu, 14 Apr 2016)
Log Message:
-----------
address@hidden in macro expansion
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-04-13 19:09:53 UTC (rev 7118)
+++ trunk/ChangeLog 2016-04-14 06:29:11 UTC (rev 7119)
@@ -1,3 +1,11 @@
+2016-04-14 Gavin Smith <address@hidden>
+
+ * doc/texinfo.tex (\scanmacro): Set catcode of @ to 0 so that
+ @-commands in macro expansions aren't printed literally in an
+ index, where \ is the escape character.
+ (\tex, \printindex): Don't set \escapechar.
+ Broken formatting reported by Christophe Rhodes and Norbert Preining.
+
2016-04-09 Gavin Smith <address@hidden>
* tp/Texinfo/Parser.pm (_parse_node_manual): Move implementation
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2016-04-13 19:09:53 UTC (rev 7118)
+++ trunk/doc/texinfo.tex 2016-04-14 06:29:11 UTC (rev 7119)
@@ -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{2016-03-29.15}
+\def\texinfoversion{2016-04-14.07}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -5371,7 +5371,6 @@
\putwordIndexNonexistent
\else
\catcode`\\ = 0
- \escapechar = `\\
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
@@ -6943,7 +6942,6 @@
\catcode `\>=\other
\catcode `\`=\other
\catcode `\'=\other
- \escapechar=`\\
%
% ' is active in math mode (mathcode"8000). So reset it, and all our
% other math active characters (just in case), to plain's definitions.
@@ -7921,15 +7919,29 @@
% alias because \c means cedilla in @tex or @math
\let\texinfoc=\c
+\newcount\savedcatcodeone
+\newcount\savedcatcodetwo
+
% Used at the time of macro expansion.
% Argument is macro body with arguments substituted
\def\scanmacro#1{%
\newlinechar`\^^M
\def\xeatspaces{\eatspaces}%
%
+ % Temporarily undo catcode changes of \printindex. Set catcode of @ to
+ % 0 so that @-commands in macro expansions aren't printed literally when
+ % formatting an index file, where \ is used as the escape character.
+ \savedcatcodeone=\catcode`\@
+ \savedcatcodetwo=\catcode`\\
+ address@hidden
+ \catcode`\\=\active
+ %
% Process the macro body under the current catcode regime.
- \scantokens{#1\texinfoc}\aftermacro%
+ address@hidden
%
+ address@hidden
+ \catcode`\\=\savedcatcodetwo
+ %
% The \texinfoc is to remove the \newlinechar added by \scantokens, and
% can be noticed by \parsearg.
% The \aftermacro allows a \comment at the end of the macro definition
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7119] address@hidden in macro expansion,
Gavin D. Smith <=