diff options
author | Fred Drake <fdrake@acm.org> | 2001-06-22 15:51:28 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-06-22 15:51:28 (GMT) |
commit | 5107a51a6584204a8c7fdbae40caf010cfb33dee (patch) | |
tree | 7f1d92165f274e7d499b4062af30206673e83f80 | |
parent | 9c573b027fc73842209263ab819e048f35603cbb (diff) | |
download | cpython-5107a51a6584204a8c7fdbae40caf010cfb33dee.zip cpython-5107a51a6584204a8c7fdbae40caf010cfb33dee.tar.gz cpython-5107a51a6584204a8c7fdbae40caf010cfb33dee.tar.bz2 |
Add support for the classdesc* environment and the \releaseinfo and
\setreleaseinfo macros added to the CVS head.
-rw-r--r-- | Doc/perl/l2hinit.perl | 6 | ||||
-rw-r--r-- | Doc/perl/python.perl | 21 | ||||
-rw-r--r-- | Doc/texinputs/python.sty | 15 |
3 files changed, 38 insertions, 4 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl index d3720d9..7ef9ad6 100644 --- a/Doc/perl/l2hinit.perl +++ b/Doc/perl/l2hinit.perl @@ -181,12 +181,12 @@ sub make_nav_panel { sub get_version_text { if ($PACKAGE_VERSION ne '' && $t_date) { return ("<span class=\"release-info\">" - . "Release $PACKAGE_VERSION," + . "Release $PACKAGE_VERSION$RELEASE_INFO," . " documentation updated on $t_date.</span>"); } if ($PACKAGE_VERSION ne '') { return ("<span class=\"release-info\">" - . "Release $PACKAGE_VERSION.</span>"); + . "Release $PACKAGE_VERSION$RELEASE_INFO.</span>"); } if ($t_date) { return ("<span class=\"release-info\">Documentation released on " @@ -415,7 +415,7 @@ sub do_cmd_textohtmlinfopage { if ($t_date) { # mostly ours $the_version = ",\n$t_date"; if ($PACKAGE_VERSION) { - $the_version .= ", Release $PACKAGE_VERSION"; + $the_version .= ", Release $PACKAGE_VERSION$RELEASE_INFO"; } } $_ = (($INFO == 1) diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 7b58d6a..1e54ae9 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -104,6 +104,7 @@ sub do_cmd_e{ '\' . @_[0]; } $DEVELOPER_ADDRESS = ''; $SHORT_VERSION = ''; +$RELEASE_INFO = ''; $PACKAGE_VERSION = ''; sub do_cmd_version{ $PACKAGE_VERSION . @_[0]; } @@ -114,6 +115,12 @@ sub do_cmd_release{ return $_; } +sub do_cmd_setreleaseinfo{ + local($_) = @_; + $RELEASE_INFO = next_argument(); + return $_; +} + sub do_cmd_setshortversion{ local($_) = @_; $SHORT_VERSION = next_argument(); @@ -906,6 +913,17 @@ sub do_env_classdesc{ return handle_classlike_descriptor(@_[0], "class"); } +sub do_env_classdescstar{ + local($_) = @_; + $THIS_CLASS = next_argument(); + $idx = make_str_index_entry( + "<tt class=\"class\">$THIS_CLASS</tt> (class in $THIS_MODULE)"); + $idx =~ s/ \(.*\)//; + return ("<dl><dt><b>class $idx</b>\n<dd>" + . $_ + . '</dl>'); +} + sub do_env_excclassdesc{ return handle_classlike_descriptor(@_[0], "exception"); } @@ -1296,7 +1314,8 @@ sub make_my_titlepage() { if ($t_date) { $the_title .= "\n<p>"; if ($PACKAGE_VERSION) { - $the_title .= "<strong>Release $PACKAGE_VERSION</strong><br>\n"; + $the_title .= ('<strong>Release ' + . "$PACKAGE_VERSION$RELEASE_INFO</strong><br>\n"); } $the_title .= "<strong>$t_date</strong></p>" } diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 795882d..e4c60b8 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -623,6 +623,15 @@ \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] }{\end{fulllineitems}} +% \begin{classdesc*}{name} +\newenvironment{classdesc*}[1]{ + % Using \renewcommand doesn't work for this, for unknown reasons: + \global\def\py@thisclass{#1} + \begin{fulllineitems} + \item[\strong{class }\code{\bfcode{#1}}% + \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] +}{\end{fulllineitems}} + % \begin{excclassdesc}{name}{constructor args} % but indexes as an exception \newenvironment{excclassdesc}[2]{ @@ -633,6 +642,9 @@ \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}] }{\end{fulllineitems}} +% There is no corresponding {excclassdesc*} environment. To describe +% a class exception without parameters, use the {excdesc} environment. + \let\py@classbadkey=\@undefined @@ -1036,12 +1048,15 @@ \newcommand{\py@release}{} \newcommand{\version}{} \newcommand{\shortversion}{} +\newcommand{\releaseinfo}{} \newcommand{\releasename}{Release} \newcommand{\release}[1]{% \renewcommand{\py@release}{\releasename\space\version}% \renewcommand{\version}{#1}} \newcommand{\setshortversion}[1]{% \renewcommand{\shortversion}{#1}} +\newcommand{\setreleaseinfo}[1]{% + \renewcommand{\releaseinfo}{#1}} % Allow specification of the author's address separately from the % author's name. This can be used to format them differently, which |