diff options
author | Fred Drake <fdrake@acm.org> | 1999-05-17 14:47:10 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-05-17 14:47:10 (GMT) |
commit | 5bc8d99bce20cd5acf87448db035895610b6df20 (patch) | |
tree | 201857426ae2dce32896bdac8927db3605cfa263 /Doc | |
parent | 8ee593cb46b76bd932f70168e6cce119af725295 (diff) | |
download | cpython-5bc8d99bce20cd5acf87448db035895610b6df20.zip cpython-5bc8d99bce20cd5acf87448db035895610b6df20.tar.gz cpython-5bc8d99bce20cd5acf87448db035895610b6df20.tar.bz2 |
\declaremodule: Make this more robust. Only attempt to add an index
entry based on the module type if the type is known.
Otherwise, spit out a warning the the module type
parameter was bad and generate a "plain" index entry.
Without this, the bad module type was emitted as
text.
Problem noticed by processing Michael Hudson's docs for
bytecodehacks.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/texinputs/python.sty | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index c8d3691..121d045 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -314,7 +314,12 @@ \else \renewcommand{\py@thismodulekey}{#1} \fi - \csname py@#2IndexModule\endcsname{#3} + \@ifundefined{py@#2IndexModule}{% + \typeout{*** MACRO declaremodule called with unknown module type: `#2'} + \py@ModuleIndex{#3}% + }{% + \csname py@#2IndexModule\endcsname{#3}% + } \label{module-\py@thismodulekey} } \newif\ifpy@ModPlatformFileIsOpen \py@ModPlatformFileIsOpenfalse |