Mercurial > cpython-lru_cache-weakref
diff Doc/texinputs/python.sty @ 15362:9a17cdcd3320 legacy-trunk
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.)
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 30 Oct 2000 06:22:22 +0000 |
| parents | 74e1d79520fd |
| children | 64545c986b98 |
line wrap: on
line diff
--- a/Doc/texinputs/python.sty Sun Oct 29 13:21:45 2000 +0000 +++ b/Doc/texinputs/python.sty Mon Oct 30 06:22:22 2000 +0000 @@ -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}
