[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[texinfo] 01/01: fix TeX macro expansion in index entries (see bug #815205)



This is an automated email from the git hooks/post-receive script.

preining pushed a commit to branch master
in repository texinfo.

commit 177e7223abe04c04bd341da928c3426ce3dfb4c2
Author: Norbert Preining <preining@debian.org>
Date:   Wed Apr 13 09:22:07 2016 +0900

    fix TeX macro expansion in index entries (see bug #815205)
---
 debian/changelog         |  6 ++---
 debian/patches/fix-index | 60 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series    |  1 +
 3 files changed, 64 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1c1b929..e41e32e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-texinfo (6.1.0.dfsg.1-6) UNRELEASED; urgency=medium
+texinfo (6.1.0.dfsg.1-6) unstable; urgency=medium
 
-  * UNRELEASED
+  * fix TeX macro expansion in index entries (see bug #815205)
   * recommend texlive-fonts-recommended to reduce chances that
     EC fonts are not installed, which are often needed
 
- -- Norbert Preining <preining@debian.org>  Sun, 06 Mar 2016 13:18:30 +0900
+ -- Norbert Preining <preining@debian.org>  Wed, 13 Apr 2016 09:21:24 +0900
 
 texinfo (6.1.0.dfsg.1-5) unstable; urgency=medium
 
diff --git a/debian/patches/fix-index b/debian/patches/fix-index
new file mode 100644
index 0000000..beb3396
--- /dev/null
+++ b/debian/patches/fix-index
@@ -0,0 +1,60 @@
+fix expansion of TeX macros in index entries, see bug #815205
+should be upstream as it was sent by Gavin
+---
+ doc/texinfo.tex |   17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+--- texinfo.orig/doc/texinfo.tex
++++ texinfo/doc/texinfo.tex
+@@ -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-02-05.07.deb2}
++\def\texinfoversion{2016-02-05.07.deb3}
+ %
+ % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+ % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+@@ -5118,7 +5118,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
+@@ -6703,7 +6702,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.
+@@ -7681,14 +7679,25 @@
+ % 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
++  \savedcatcodeone=\catcode`\@
++  \savedcatcodetwo=\catcode`\\
++  \catcode`\@=0
++  \catcode`\\=\active
+   %
+   % Process the macro body under the current catcode regime.
+-  \scantokens{#1\texinfoc}\aftermacro%
++  \scantokens{#1@texinfoc}\aftermacro%
++  %
++  \catcode`\@=\savedcatcodeone
++  \catcode`\\=\savedcatcodetwo
+   %
+   % The \c is to remove the \newlinechar added by \scantokens, and
+   % can be noticed by \parsearg.
diff --git a/debian/patches/series b/debian/patches/series
index 35421e3..c09f2b4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ upstream-svn7027-remove-debug-statement
 upstream-svn7031-texi2dvi-fix
 upstream-svn7032-info-match-nocase
 upstream-svn7041-fix-single-arg-macros
+fix-index

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texinfo.git


Reply to: