changeset 27948:058ff501c92d stable

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 ec0690a6955c
children 47216fd5d532
files doc/interpreter/macros.texi doc/interpreter/munge-texi.pl
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/macros.texi	Sun Dec 22 01:01:27 2019 +0100
+++ b/doc/interpreter/macros.texi	Tue Mar 19 14:46:52 2019 +0000
@@ -46,9 +46,14 @@
 @c Implementation Note:
 @c For TeX, @vskip produces a nice separation.
 @c For Texinfo, '@sp 1' should work, but in practice produces ugly results
-@c for HTML.  We use a simple blank line to produce the correct behavior.
+@c for HTML.  We use a simple blank line to produce the correct
+@c behavior.
+@c
+@c We use @xseealso now because Texinfo introduced its own @seealso
+@c command.  But instead of modifying all source files, we'll have the
+@c munge-texi script convert @seealso to @xseealso.
 
-@macro seealso {args}
+@macro xseealso {args}
 @iftex
 @vskip 2pt
 @end iftex
--- a/doc/interpreter/munge-texi.pl	Sun Dec 22 01:01:27 2019 +0100
+++ b/doc/interpreter/munge-texi.pl	Tue Mar 19 14:46:52 2019 +0000
@@ -73,6 +73,8 @@
 
 TXI_LINE: while (<STDIN>)
 {
+  s/\@seealso/\@xseealso/g;
+
   if (/^\s*\@DOCSTRING\((\S+)\)/)
   {
     $func = $1;
@@ -139,7 +141,9 @@
         $repl .= "\@ref{XREF$node,,$func}, ";
       }
       substr($repl,-2) = "";   # Remove last ', '
-      $_ = "\@seealso{$repl}$rest_of_line";
+      # write out @xseealso because we have our own macro that conflicts
+      # with the one introduced in Texinfo 6.
+      $_ = "\@xseealso{$repl}$rest_of_line";
     }
 
     $docstring .= $_;