Mercurial > octave
comparison doc/interpreter/munge-texi.pl @ 26939:6acb713f8231
avoid conflict with @seealso macro in Texinfo 6.6 (bug #55952)
* macros.texi: Define @xseealso instead of @seealso.
* munge-texi.pl: Translate @seealso in DOCSTRINGS and source files to
@xseealso.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Mar 2019 14:46:52 +0000 |
parents | 00f796120a6d |
children | b442ec6dda5c |
comparison
equal
deleted
inserted
replaced
26938:58e300954518 | 26939:6acb713f8231 |
---|---|
71 # Add warning header | 71 # Add warning header |
72 print '@c DO NOT EDIT! Generated automatically by munge-texi.pl.',"\n\n"; | 72 print '@c DO NOT EDIT! Generated automatically by munge-texi.pl.',"\n\n"; |
73 | 73 |
74 TXI_LINE: while (<STDIN>) | 74 TXI_LINE: while (<STDIN>) |
75 { | 75 { |
76 s/\@seealso/\@xseealso/g; | |
77 | |
76 if (/^\s*\@DOCSTRING\((\S+)\)/) | 78 if (/^\s*\@DOCSTRING\((\S+)\)/) |
77 { | 79 { |
78 $func = $1; | 80 $func = $1; |
79 $docstring = $help_text{$func}; | 81 $docstring = $help_text{$func}; |
80 if (! $docstring) | 82 if (! $docstring) |
137 $node = $func; | 139 $node = $func; |
138 $node =~ s/\./_/g; # Texinfo doesn't like '.' in node names | 140 $node =~ s/\./_/g; # Texinfo doesn't like '.' in node names |
139 $repl .= "\@ref{XREF$node,,$func}, "; | 141 $repl .= "\@ref{XREF$node,,$func}, "; |
140 } | 142 } |
141 substr($repl,-2) = ""; # Remove last ', ' | 143 substr($repl,-2) = ""; # Remove last ', ' |
142 $_ = "\@seealso{$repl}$rest_of_line"; | 144 # write out @xseealso because we have our own macro that conflicts |
145 # with the one introduced in Texinfo 6. | |
146 $_ = "\@xseealso{$repl}$rest_of_line"; | |
143 } | 147 } |
144 | 148 |
145 $docstring .= $_; | 149 $docstring .= $_; |
146 } | 150 } |
147 | 151 |