diff Doc/texinputs/python.sty @ 7550:69860821ca1d legacy-trunk

Create the module index only if a conditional is true.
author Fred Drake <fdrake@acm.org>
date Wed, 04 Mar 1998 21:56:42 +0000
parents 7eb19b1ce84d
children cc7e126f009d
line wrap: on
line diff
--- a/Doc/texinputs/python.sty	Wed Mar 04 21:52:33 1998 +0000
+++ b/Doc/texinputs/python.sty	Wed Mar 04 21:56:42 1998 +0000
@@ -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 }}