# HG changeset patch # User John W. Eaton # Date 1259609530 18000 # Node ID 1506a17832c95a7418a69305e49c9a114317eaf9 # Parent 483c4b09b788d92b1a0a0a43fc5c390e0bfd684e doc building fixes for class methods diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2009-11-30 John W. Eaton + + * interpreter/munge-texi.cc (process_texi_input_file): Double @ in + symbol_name used in @anchor. + (extract_docstring): Double @ in function name used in @ref. + + * interpreter/mk_doc_cache.m (cmd): Transform @ in class names to + @@ when processing DOCSTRINGS files. + 2009-11-30 John W. Eaton * interpreter/Makefile.a (nodist_octave_TEXINFOS): Add diff --git a/doc/interpreter/mk_doc_cache.m b/doc/interpreter/mk_doc_cache.m --- a/doc/interpreter/mk_doc_cache.m +++ b/doc/interpreter/mk_doc_cache.m @@ -59,6 +59,7 @@ text = regexprep (text, "@seealso *{([^}]*)}", "See also: $1."); text = regexprep (text, "-\\*- texinfo -\\*-[ \t]*[\r\n]*", ""); +text = regexprep (text, "@", "@@"); [fid, name, msg] = mkstemp ("octave_doc_XXXXXX", true); diff --git a/doc/interpreter/munge-texi.cc b/doc/interpreter/munge-texi.cc --- a/doc/interpreter/munge-texi.cc +++ b/doc/interpreter/munge-texi.cc @@ -127,6 +127,9 @@ else doc += ", "; + if (function_name[0] == '@') + function_name = "@" + function_name; + doc += "@ref{doc-" + function_name + ",," + function_name + "}"; @@ -276,6 +279,9 @@ // possible using @anchor{TAG} (new with // Texinfo 4.0). + if (symbol_name[0] == '@') + symbol_name = "@" + symbol_name; + os << "@anchor{doc-" << symbol_name << "}\n"; os << doc_string.substr (j); diff --git a/doc/interpreter/system.txi b/doc/interpreter/system.txi --- a/doc/interpreter/system.txi +++ b/doc/interpreter/system.txi @@ -252,15 +252,15 @@ @node FTP objects @subsection FTP objects -@DOCSTRING(ftp) +@DOCSTRING(@ftp/ftp) -@DOCSTRING(mget) +@DOCSTRING(@ftp/mget) -@DOCSTRING(mput) +@DOCSTRING(@ftp/mput) -@DOCSTRING(ascii) +@DOCSTRING(@ftp/ascii) -@DOCSTRING(binary) +@DOCSTRING(@ftp/binary) @node URL manipulation @subsection URL manipulation diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-11-30 John W. Eaton + + * mkdoc: Handle classes in function names. + 2009-11-27 David Bateman * @ftp/ascii.m, @ftp/binary.m, @ftp/cd.m, @ftp/close.m, diff --git a/scripts/mkdoc b/scripts/mkdoc --- a/scripts/mkdoc +++ b/scripts/mkdoc @@ -44,8 +44,12 @@ else echo "$prefix$arg" | $PERL -n -e 'chop; $f = "$_"; - next unless m{(.*)/(.*)\.m}; - for (qx{./gethelp $2 "$f" < "$f"}) { + next unless m{(.*)/(@|)([^/]*)/(.*)\.m}; + $fcn = "$4"; + if ($2) { + $fcn = "$2$3/$fcn"; + } + for (qx{./gethelp $fcn "$f" < "$f"}) { s/^\s+\@/\@/ unless $i_am_in_example; s/^\s+\@group/\@group/; s/^\s+\@end\s+group/\@end\s+group/;