]> granicus.if.org Git - python/commitdiff
do_cmd_refmodule(): New function to support new \refmodule macro.
authorFred Drake <fdrake@acm.org>
Wed, 13 Jan 1999 17:06:34 +0000 (17:06 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 13 Jan 1999 17:06:34 +0000 (17:06 +0000)
Doc/perl/python.perl

index ff0bd88548fc39e9ca6b7e7b65ecf5f37c40423b..d982f563866b187705af8636d9749aa0973bfd50 100644 (file)
@@ -148,6 +148,16 @@ sub do_cmd_samp{ return use_wrappers(@_[0], '"<tt>', '</tt>"'); }
 sub do_cmd_kbd{ return use_wrappers(@_[0], '<kbd>', '</kbd>'); }
 sub do_cmd_strong{ return use_wrappers(@_[0], '<b>', '</b>'); }
 
+sub do_cmd_refmodule{
+    # Insert the right magic to jump to the module definition.
+    local($_) = @_;
+    my $key = next_optional_argument();
+    my $module = next_argument();
+    $key = $module
+        unless $key;
+    return "<tt><a href=\"module-$key.html\">$module</a></tt>" . $_;
+}
+
 sub do_cmd_newsgroup{
     local($_) = @_;
     my $newsgroup = next_argument();