]> granicus.if.org Git - python/commitdiff
Fix \withsubitem so that it actually works if the only indexing macro in
authorFred Drake <fdrake@acm.org>
Mon, 30 Oct 2000 06:22:22 +0000 (06:22 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 30 Oct 2000 06:22:22 +0000 (06:22 +0000)
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.)

Doc/texinputs/python.sty

index c9b2a8f40961212624168db98b8884a32c4c71ba..b4b6aea31d628b8650f3f8a671a3be932f6dca83 100644 (file)
 }
 \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%
 }
 
 
 % 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}