changeset 22227:ab139f0733b9

Document that "help OPERATOR" needs quotes around OPERATOR (bug #39349). * help.m (help, do_list_operators): State that quotes are required. * comma.m, paren.m, semicolon.m: Move do deprecated/ directory from help directory. * scripts/deprecated/module.mk: Add comma.m, paren.m, semicolon.m to deprecated directory. * scripts/help/module.mk: Remove comma.m, paren.m, semicolon.m from help directory.
author Lachlan Andrew <lachlanbis@gmail.com>
date Sun, 12 Jun 2016 19:38:22 +1000
parents 9a0e30e24b9b
children 4afe3705ea75
files scripts/deprecated/comma.m scripts/deprecated/module.mk scripts/deprecated/paren.m scripts/deprecated/semicolon.m scripts/help/comma.m scripts/help/help.m scripts/help/module.mk scripts/help/paren.m scripts/help/semicolon.m
diffstat 9 files changed, 100 insertions(+), 98 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/deprecated/comma.m	Sun Jun 12 19:38:22 2016 +1000
@@ -0,0 +1,28 @@
+## Copyright (C) 1995-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {} {} ,
+## Array index, function argument, or command separator.
+## @seealso{semicolon}
+## @end deftypefn
+
+
+## Mark file as being tested.  No real test needed for a documentation .m file
+%!assert (1)
+
--- a/scripts/deprecated/module.mk	Thu Jun 30 18:30:26 2016 +1000
+++ b/scripts/deprecated/module.mk	Sun Jun 12 19:38:22 2016 +1000
@@ -3,6 +3,7 @@
 scripts_deprecated_FCN_FILES = \
   scripts/deprecated/bicubic.m \
   scripts/deprecated/bitmax.m \
+  scripts/deprecated/comma.m \
   scripts/deprecated/delaunay3.m \
   scripts/deprecated/dump_prefs.m \
   scripts/deprecated/find_dir_in_path.m \
@@ -20,8 +21,10 @@
   scripts/deprecated/octave_config_info.m \
   scripts/deprecated/octave_tmp_file_name.m \
   scripts/deprecated/onenormest.m \
+  scripts/deprecated/paren.m \
   scripts/deprecated/playaudio.m \
   scripts/deprecated/saveaudio.m \
+  scripts/deprecated/semicolon.m \
   scripts/deprecated/setaudio.m \
   scripts/deprecated/sleep.m \
   scripts/deprecated/syl.m \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/deprecated/paren.m	Sun Jun 12 19:38:22 2016 +1000
@@ -0,0 +1,28 @@
+## Copyright (C) 1996-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn  {} {} (
+## @deftypefnx {} {} )
+## Array index or function argument delimeter.
+## @end deftypefn
+
+
+## Mark file as being tested.  No real test needed for a documentation .m file
+%!assert (1)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/deprecated/semicolon.m	Sun Jun 12 19:38:22 2016 +1000
@@ -0,0 +1,28 @@
+## Copyright (C) 1995-2015 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or (at
+## your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {} {} ;
+## Array row or command separator.
+## @seealso{comma}
+## @end deftypefn
+
+
+## Mark file as being tested.  No real test needed for a documentation .m file
+%!assert (1)
+
--- a/scripts/help/comma.m	Thu Jun 30 18:30:26 2016 +1000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-## Copyright (C) 1995-2015 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {} {} ,
-## Array index, function argument, or command separator.
-## @seealso{semicolon}
-## @end deftypefn
-
-
-## Mark file as being tested.  No real test needed for a documentation .m file
-%!assert (1)
-
--- a/scripts/help/help.m	Thu Jun 30 18:30:26 2016 +1000
+++ b/scripts/help/help.m	Sun Jun 12 19:38:22 2016 +1000
@@ -33,13 +33,13 @@
 ## Given the single argument @code{.}, list all operators available in the
 ## current session of Octave.
 ##
-## If invoked without any arguments, @code{help} display instructions on how to
-## access help from the command line.
+## If invoked without any arguments, @code{help} displays instructions on how
+## to access help from the command line.
 ##
-## The help command can provide information about most operators, for example
-## @code{help +}, but not the comma and semicolon characters which are used
-## by the Octave interpreter as command separators.  For help on either of
-## these type @kbd{help comma} or @kbd{help semicolon}.
+## The help command can provide information about most operators, but
+## @var{name} must be enclosed by single or double quotes to prevent
+## the Octave interpreter from acting on @var{name}.  For example,
+## @code{help "+"} displays help on the addition operator.
 ## @seealso{doc, lookfor, which, info}
 ## @end deftypefn
 
@@ -53,10 +53,10 @@
     help NAME\n\
 \n\
   (replace NAME with the name of the command or function you would\n\
-  like to learn more about).\n\
+  like to learn more about; for an operator, enclose NAME in quotes).\n\
 \n\
-  For a more detailed introduction to GNU Octave, please consult the\n\
-  manual.  To read the manual from the prompt type\n\
+  For a more detailed introduction to GNU Octave, consult the manual.\n\
+  The manual may be read from the prompt by typing\n\
 \n\
     doc\n\
 \n\
@@ -130,8 +130,10 @@
 endfunction
 
 function retval = do_list_operators ()
-  retval = sprintf ("*** operators:\n\n%s\n\n",
-                    list_in_columns (__operators__ ()));
+  retval = sprintf ("*** operators:\n\n%s\n%s\n\n",
+                    list_in_columns (__operators__ ()),
+                    ["To obtain help on an operator, type\n"...
+                     "      help \"NAME\"   or   help 'NAME'"]);
 endfunction
 
 function retval = do_list_functions ()
--- a/scripts/help/module.mk	Thu Jun 30 18:30:26 2016 +1000
+++ b/scripts/help/module.mk	Sun Jun 12 19:38:22 2016 +1000
@@ -11,16 +11,13 @@
   scripts/help/__makeinfo__.m \
   scripts/help/__unimplemented__.m \
   scripts/help/ans.m \
-  scripts/help/comma.m \
   scripts/help/doc.m \
   scripts/help/doc_cache_create.m \
   scripts/help/get_first_help_sentence.m \
   scripts/help/error_ids.m \
   scripts/help/help.m \
   scripts/help/lookfor.m \
-  scripts/help/paren.m \
   scripts/help/print_usage.m \
-  scripts/help/semicolon.m \
   scripts/help/type.m \
   scripts/help/warning_ids.m \
   scripts/help/which.m
--- a/scripts/help/paren.m	Thu Jun 30 18:30:26 2016 +1000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-## Copyright (C) 1996-2015 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn  {} {} (
-## @deftypefnx {} {} )
-## Array index or function argument delimeter.
-## @end deftypefn
-
-
-## Mark file as being tested.  No real test needed for a documentation .m file
-%!assert (1)
-
--- a/scripts/help/semicolon.m	Thu Jun 30 18:30:26 2016 +1000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-## Copyright (C) 1995-2015 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or (at
-## your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <http://www.gnu.org/licenses/>.
-
-## -*- texinfo -*-
-## @deftypefn {} {} ;
-## Array row or command separator.
-## @seealso{comma}
-## @end deftypefn
-
-
-## Mark file as being tested.  No real test needed for a documentation .m file
-%!assert (1)
-