]> granicus.if.org Git - python/commitdiff
Create the module index only if a conditional is true.
authorFred Drake <fdrake@acm.org>
Wed, 4 Mar 1998 21:56:42 +0000 (21:56 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 4 Mar 1998 21:56:42 +0000 (21:56 +0000)
Doc/python.sty
Doc/texinputs/python.sty

index 93957a644dc68be1bb1b830eecbd4cdc7a3d64ff..01d16c9f05875c831926226dd0372c2b7e85268e 100644 (file)
 \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 }}
index 93957a644dc68be1bb1b830eecbd4cdc7a3d64ff..01d16c9f05875c831926226dd0372c2b7e85268e 100644 (file)
 \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 }}