Mercurial > octave
changeset 22430:18b863e3b1e2
Properly display help for operators (bug #48975).
* op-kw-docs: Escape any operators with a backslash so they are presented
correctly when changed from Texinfo to "plain text".
* help.m: Call undo_string_escapes on input so that names of certain operators
like the left division operator '\' are represented correctly.
* which.m: Call undo_string_escapes on input so that names of certain operators
like the left division operator '\' are represented correctly.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 02 Sep 2016 09:47:47 -0700 |
parents | 00986ee43956 |
children | 475b4cd1b789 |
files | libinterp/op-kw-docs scripts/help/help.m scripts/help/which.m |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/op-kw-docs Fri Sep 02 08:54:41 2016 -0700 +++ b/libinterp/op-kw-docs Fri Sep 02 09:47:47 2016 -0700 @@ -247,28 +247,28 @@ -*- texinfo -*- @deftypefn {} {} ./ Element by element right division operator. -@seealso{/, .\, rdivide, mrdivide} +@seealso{/, .\\, rdivide, mrdivide} @end deftypefn / @c libinterp/parse-tree/oct-parse.in.yy -*- texinfo -*- @deftypefn {} {} / Right division operator. -@seealso{./, \, rdivide, mrdivide} +@seealso{./, \\, rdivide, mrdivide} @end deftypefn .\ @c libinterp/parse-tree/oct-parse.in.yy -*- texinfo -*- @deftypefn {} {} .\ Element by element left division operator. -@seealso{\, ./, rdivide, mrdivide} +@seealso{\\, ./, rdivide, mrdivide} @end deftypefn \ @c libinterp/parse-tree/oct-parse.in.yy -*- texinfo -*- @deftypefn {} {} \ Left division operator. -@seealso{.\, /, ldivide, mldivide} +@seealso{.\\, /, ldivide, mldivide} @end deftypefn : @c libinterp/parse-tree/oct-parse.in.yy
--- a/scripts/help/help.m Fri Sep 02 08:54:41 2016 -0700 +++ b/scripts/help/help.m Fri Sep 02 09:47:47 2016 -0700 @@ -117,7 +117,7 @@ endif if (nargout == 0) - evalin ("caller", ["which (\"" name "\")"]); + evalin ("caller", ['which ("' undo_string_escapes(name) '")']); printf ("\n%s\n%s", text, __additional_help_message__ ()); else retval = text;
--- a/scripts/help/which.m Fri Sep 02 08:54:41 2016 -0700 +++ b/scripts/help/which.m Fri Sep 02 09:47:47 2016 -0700 @@ -37,7 +37,7 @@ ## functions in name resolution. for i = 1:nargin m(i).is_variable = evalin ("caller", - ["exist (\"" m(i).name "\", \"var\")"], false); + ['exist ("' undo_string_escapes(m(i).name) '", "var")'], false); if (m(i).is_variable) m(i).file = "variable"; endif