summaryrefslogtreecommitdiffstats
path: root/Doc/texinputs/python.sty
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-30 06:22:22 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-30 06:22:22 (GMT)
commitec77e6590d3b7379b07bc777b3cd1bbeb15ef8db (patch)
tree47921301f7f12ea2636184f95dfe100bff0ea1c8 /Doc/texinputs/python.sty
parentd34cfcb4c7f677b9d3b358deee8ea37dd26bf21b (diff)
downloadcpython-ec77e6590d3b7379b07bc777b3cd1bbeb15ef8db.zip
cpython-ec77e6590d3b7379b07bc777b3cd1bbeb15ef8db.tar.gz
cpython-ec77e6590d3b7379b07bc777b3cd1bbeb15ef8db.tar.bz2
Fix \withsubitem so that it actually works if the only indexing macro in
the content body is the \ttindex macro, which seems to match actual usage. Adjust \funcline to restore the "index sub-item" for functions to be " (in module <name>)" instead of " (in <name>)". This is need to match uses of \withsubitem throughout the documentation. (Not ideal, but gets achieves consistency.)
Diffstat (limited to 'Doc/texinputs/python.sty')
-rw-r--r--Doc/texinputs/python.sty15
1 files changed, 5 insertions, 10 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index c9b2a8f..b4b6aea 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -293,14 +293,8 @@
}
\newcommand{\withsubitem}[2]{%
\begingroup%
- \def\index@subitem{#1}%
- \ifpy@usingsubitem%
- #2%
- \else%
- \py@usingsubitemtrue%
- #2%
- \py@usingsubitemfalse%
- \fi
+ \def\ttindex##1{\index{##1@{\py@idxcode{##1}} #1}}%
+ #2%
\endgroup%
}
@@ -583,8 +577,9 @@
% simple functions (not methods) -----------------------------------------
% \begin{funcdesc}{name}{args}
-\newcommand{\funcline}[2]{\funclineni{#1}{#2}%
- \index{#1@{\py@idxcode{#1()}} (in \py@thismodule)}}
+\newcommand{\funcline}[2]{%
+ \funclineni{#1}{#2}%
+ \index{#1@{\py@idxcode{#1()}} (in module \py@thismodule)}}
\newenvironment{funcdesc}[2]{
\begin{fulllineitems}
\funcline{#1}{#2}