|
0 |
fix expansion of TeX macros in index entries, see bug #815205
|
|
1 |
should be upstream as it was sent by Gavin
|
|
2 |
---
|
|
3 |
doc/texinfo.tex | 17 +++++++++++++----
|
|
4 |
1 file changed, 13 insertions(+), 4 deletions(-)
|
|
5 |
|
|
6 |
--- texinfo.orig/doc/texinfo.tex
|
|
7 |
+++ texinfo/doc/texinfo.tex
|
|
8 |
@@ -3,7 +3,7 @@
|
|
9 |
% Load plain if necessary, i.e., if running under initex.
|
|
10 |
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
|
11 |
%
|
|
12 |
-\def\texinfoversion{2016-02-05.07.deb2}
|
|
13 |
+\def\texinfoversion{2016-02-05.07.deb3}
|
|
14 |
%
|
|
15 |
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
|
16 |
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
|
17 |
@@ -5118,7 +5118,6 @@
|
|
18 |
\putwordIndexNonexistent
|
|
19 |
\else
|
|
20 |
\catcode`\\ = 0
|
|
21 |
- \escapechar = `\\
|
|
22 |
%
|
|
23 |
% If the index file exists but is empty, then \openin leaves \ifeof
|
|
24 |
% false. We have to make TeX try to read something from the file, so
|
|
25 |
@@ -6703,7 +6702,6 @@
|
|
26 |
\catcode `\>=\other
|
|
27 |
\catcode `\`=\other
|
|
28 |
\catcode `\'=\other
|
|
29 |
- \escapechar=`\\
|
|
30 |
%
|
|
31 |
% ' is active in math mode (mathcode"8000). So reset it, and all our
|
|
32 |
% other math active characters (just in case), to plain's definitions.
|
|
33 |
@@ -7681,14 +7679,25 @@
|
|
34 |
% alias because \c means cedilla in @tex or @math
|
|
35 |
\let\texinfoc=\c
|
|
36 |
|
|
37 |
+\newcount\savedcatcodeone
|
|
38 |
+\newcount\savedcatcodetwo
|
|
39 |
+
|
|
40 |
% Used at the time of macro expansion.
|
|
41 |
% Argument is macro body with arguments substituted
|
|
42 |
\def\scanmacro#1{%
|
|
43 |
\newlinechar`\^^M
|
|
44 |
\def\xeatspaces{\eatspaces}%
|
|
45 |
+ % Temporarily undo catcode changes of \printindex
|
|
46 |
+ \savedcatcodeone=\catcode`\@
|
|
47 |
+ \savedcatcodetwo=\catcode`\\
|
|
48 |
+ \catcode`\@=0
|
|
49 |
+ \catcode`\\=\active
|
|
50 |
%
|
|
51 |
% Process the macro body under the current catcode regime.
|
|
52 |
- \scantokens{#1\texinfoc}\aftermacro%
|
|
53 |
+ \scantokens{#1@texinfoc}\aftermacro%
|
|
54 |
+ %
|
|
55 |
+ \catcode`\@=\savedcatcodeone
|
|
56 |
+ \catcode`\\=\savedcatcodetwo
|
|
57 |
%
|
|
58 |
% The \c is to remove the \newlinechar added by \scantokens, and
|
|
59 |
% can be noticed by \parsearg.
|