Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e1ee3e

Browse files
committed
Fix up some routines to coordinate the "indexsubitem" stuff so that
the subitem text is updated correctly when each module section is processed. Print [<modulename>] when we start on \declaremodule so we can more easily track progress during the library reference.
1 parent 72e5a90 commit 2e1ee3e

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

Doc/perl/python.perl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ sub get_indexsubitem{
238238

239239
sub do_cmd_setindexsubitem{
240240
local($_) = @_;
241-
my $subitem = next_argument();
242-
$INDEX_SUBITEM = $subitem;
241+
$INDEX_SUBITEM = next_argument();
243242
return $_;
244243
}
245244

@@ -406,6 +405,8 @@ sub make_mod_index_entry{
406405
my($str,$define) = @_;
407406
my($name,$aname,$ahref) = new_link_info();
408407
# equivalent of add_index_entry() using $define instead of ''
408+
$ahref =~ s/\#[-_a-zA-Z0-9]*\"/\"/
409+
if ($define eq 'DEF');
409410
$str = gen_index_id($str, $define);
410411
$index{$str} .= $ahref;
411412
write_idxfile($ahref, $str);
@@ -426,6 +427,8 @@ sub define_module{
426427
my $section_tag = join('', @curr_sec_id);
427428
$word = "$word " if $word;
428429
$THIS_MODULE = "$name";
430+
$INDEX_SUBITEM = "(in $name)";
431+
print "[$name]";
429432
return make_mod_index_entry("<tt>$name</tt> (${word}module)", 'DEF');
430433
}
431434

@@ -491,8 +494,7 @@ sub do_env_cfuncdesc{
491494
. get_indexsubitem());
492495
$idx =~ s/ \(.*\)//;
493496
$idx =~ s/\(\)//; # ????
494-
return "<dl><dt>$return_type <b>$idx</b>"
495-
. "(<var>$arg_list</var>)\n<dd>"
497+
return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>"
496498
. $_
497499
. '</dl>';
498500
}
@@ -1024,7 +1026,12 @@ sub do_cmd_term{
10241026

10251027
process_commands_wrap_deferred(<<_RAW_ARG_DEFERRED_CMDS_);
10261028
code # {}
1029+
declaremodule # [] # {} # {}
1030+
memberline # [] # {}
1031+
methodline # [] # {} # {}
1032+
modulesynopsis # {}
10271033
samp # {}
1034+
setindexsubitem # {}
10281035
_RAW_ARG_DEFERRED_CMDS_
10291036

10301037

0 commit comments

Comments
 (0)