summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-03-04 21:56:42 (GMT)
committerFred Drake <fdrake@acm.org>1998-03-04 21:56:42 (GMT)
commit3455edcbc8fa586a6d3c70ea34e3c71b2763c98a (patch)
tree5bf6cb68b58a2840ef1cd3839de6496446264474
parent54b03b85f77308dca0a6d32ac4acec726378e879 (diff)
downloadcpython-3455edcbc8fa586a6d3c70ea34e3c71b2763c98a.zip
cpython-3455edcbc8fa586a6d3c70ea34e3c71b2763c98a.tar.gz
cpython-3455edcbc8fa586a6d3c70ea34e3c71b2763c98a.tar.bz2
Create the module index only if a conditional is true.
-rw-r--r--Doc/python.sty10
-rw-r--r--Doc/texinputs/python.sty10
2 files changed, 14 insertions, 6 deletions
diff --git a/Doc/python.sty b/Doc/python.sty
index 93957a6..01d16c9 100644
--- a/Doc/python.sty
+++ b/Doc/python.sty
@@ -261,14 +261,18 @@
\newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }}
% support for the module index
-\newwrite\modindexfile
-\openout\modindexfile=mod\jobname.idx
+\if@usemoduleindex
+ \newwrite\modindexfile
+ \openout\modindexfile=mod\jobname.idx
+\fi
% Add the defining entry for a module
\newcommand{\defmodindex}[2]{%
\index{#1@{\idxcode{#1}} (#2module)|textbf}%
\setindexsubitem{(in module #1)}%
- \write\modindexfile{#1 \thepage}}
+ \if@usemoduleindex%
+ \write\modindexfile{#1 \thepage}%
+ \fi}
% built-in & Python modules in the main distribution
\newcommand{\bimodindex}[1]{\defmodindex{#1}{built-in }}
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 93957a6..01d16c9 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -261,14 +261,18 @@
\newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }}
% support for the module index
-\newwrite\modindexfile
-\openout\modindexfile=mod\jobname.idx
+\if@usemoduleindex
+ \newwrite\modindexfile
+ \openout\modindexfile=mod\jobname.idx
+\fi
% Add the defining entry for a module
\newcommand{\defmodindex}[2]{%
\index{#1@{\idxcode{#1}} (#2module)|textbf}%
\setindexsubitem{(in module #1)}%
- \write\modindexfile{#1 \thepage}}
+ \if@usemoduleindex%
+ \write\modindexfile{#1 \thepage}%
+ \fi}
% built-in & Python modules in the main distribution
\newcommand{\bimodindex}[1]{\defmodindex{#1}{built-in }}