# HG changeset patch # User Rik # Date 1579205522 28800 # Node ID 72ed9d08519676c951840c2f649193dd7c60bccd # Parent bceab42914f2345e09157e3797ddf1d2ba889387 munge-texi.pl: small cleanups to formatting and a regexp. * munge-texi.pl: Use s'...'...' for search and replace which does not require escaping at symbol '\@'. Re-format some comment lines for readability. diff -r bceab42914f2 -r 72ed9d085196 doc/interpreter/munge-texi.pl --- a/doc/interpreter/munge-texi.pl Wed Jan 15 22:22:23 2020 -0600 +++ b/doc/interpreter/munge-texi.pl Thu Jan 16 12:12:02 2020 -0800 @@ -41,8 +41,8 @@ # Load DOCSTRINGS into memory while expanding @seealso references foreach $DOCSTRING_file (@ARGV) { - ## DOCSTRINGS files may exist in the current (build) directory or in the - ## source directory when building from a release. + ## DOCSTRINGS files may exist in the current (build) directory OR + ## in the source directory when building from a release. $DOCSTRING_file_srcdir = "$top_srcdir/$DOCSTRING_file"; open (DOCFH, $DOCSTRING_file) or open (DOCFH, $DOCSTRING_file_srcdir) @@ -57,7 +57,7 @@ do { s/\s*$//; # strip EOL character(s) - $symbol = substr ($_,1); + $symbol = substr ($_, 1); $docstring = extract_docstring (); if ($help_text{$symbol}) { @@ -80,7 +80,7 @@ TXI_LINE: while () { - s/\@seealso/\@xseealso/g; + s'@seealso'@xseealso'g; if (/^\s*\@DOCSTRING\((\S+)\)/) { @@ -132,7 +132,7 @@ # expand any @seealso references if (m'^@seealso\{') { - # Join multiple lines until full macro body found + # join multiple lines until full macro body found while (! /}/m) { $_ .= ; } ($arg_list, $rest_of_line) = m'^@seealso\{(.*)\}(.*)?'s; @@ -142,9 +142,9 @@ $repl = ""; foreach $func (split (/,/, $func_list)) { - $func =~ s/^@/@@/; # Texinfo uses @@ to produce '@' + $func =~ s/^@/@@/; # Texinfo uses @@ to produce '@' $node = $func; - $node =~ s/\./_/g; # Texinfo doesn't like '.' in node names + $node =~ s/\./_/g; # Texinfo doesn't like '.' in node names $repl .= "\@ref{XREF$node,,$func}, "; } substr($repl,-2) = ""; # Remove last ', '