changeset 9133:c0cef1436788

Update help text for sections 2.2 and 2.3 of basics.txi
author Rik <rdrider0-list@yahoo.com>
date Fri, 17 Apr 2009 15:16:33 -0700
parents eb1747dbd360
children a3739e27b017
files doc/ChangeLog doc/interpreter/basics.txi scripts/help/doc.m scripts/help/help.m scripts/help/lookfor.m src/help.cc src/toplev.cc
diffstat 7 files changed, 65 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,4 +1,9 @@
-2009-04-16  Rik  <rdrider0-list@yahoo.com>
+2009-04-17  Rik  <rdrider0-list@yahoo.com>
+
+	* interpreter/basics.txi: Update help text for sections 2.2 
+	and 2.3 of basics.txi
+
+2009-04-17  Rik  <rdrider0-list@yahoo.com>
 
 	* interpreter/basics.txi: Update help strings for command line options
 
--- a/doc/interpreter/basics.txi
+++ b/doc/interpreter/basics.txi
@@ -80,7 +80,7 @@
 @cindex @code{--doc-cache-file @var{filename}}
 Specify the name of the doc cache file to use.  The value of @var{filename}
 specified on the command line will override any value of
-@code{OCTAVE_DOC_CACHE_FILE} found in the environment, but not any commands
+@w{@code{OCTAVE_DOC_CACHE_FILE}} found in the environment, but not any commands
 in the system or user startup files that use the @code{doc_cache_file}
 function.
 
@@ -98,9 +98,9 @@
 @cindex @code{--exec-path @var{path}}
 Specify the path to search for programs to run.  The value of @var{path}
 specified on the command line will override any value of
-@code{OCTAVE_EXEC_PATH} found in the environment, but not any commands
+@w{@code{OCTAVE_EXEC_PATH}} found in the environment, but not any commands
 in the system or user startup files that set the built-in variable
-@code{EXEC_PATH}.
+@w{@code{EXEC_PATH}}.
 
 @item  --help
 @itemx -h
@@ -114,15 +114,15 @@
 @cindex @code{--image-path @var{path}}
 Add path to the head of the search path for images.  The value of 
 @var{path} specified on the command line will override any value of 
-@code{OCTAVE_IMAGE_PATH} found in the environment, but not any commands 
+@w{@code{OCTAVE_IMAGE_PATH}} found in the environment, but not any commands 
 in the system or user startup files that set the built-in variable 
-@code{IMAGE_PATH}.
+@w{@code{IMAGE_PATH}}.
 
 @item --info-file @var{filename}
 @cindex @code{--info-file @var{filename}}
 Specify the name of the info file to use.  The value of @var{filename}
 specified on the command line will override any value of
-@code{OCTAVE_INFO_FILE} found in the environment, but not any commands
+@w{@code{OCTAVE_INFO_FILE}} found in the environment, but not any commands
 in the system or user startup files that use the @code{info_file}
 function.
 
@@ -130,7 +130,7 @@
 @cindex @code{--info-program @var{program}}
 Specify the name of the info program to use.  The value of @var{program}
 specified on the command line will override any value of
-@code{OCTAVE_INFO_PROGRAM} found in the environment, but not any
+@w{@code{OCTAVE_INFO_PROGRAM}} found in the environment, but not any
 commands in the system or user startup files that use the
 @code{info_program} function.
 
@@ -183,7 +183,7 @@
 @cindex @code{-p @var{path}}
 Add path to the head of the search path for function files.  The 
 value of @var{path} specified on the command line will override any value
-of @code{OCTAVE_PATH} found in the environment, but not any commands in the
+of @w{@code{OCTAVE_PATH}} found in the environment, but not any commands in the
 system or user startup files that set the internal load path through one
 of the path functions.
 
@@ -372,7 +372,7 @@
 
 @DOCSTRING(warranty)
 
-The following function can be used to change which programs are used
+The following functions can be used to change which programs are used
 for displaying the documentation, and where the documentation can be
 found.
 
@@ -382,6 +382,8 @@
 
 @DOCSTRING(makeinfo_program)
 
+@DOCSTRING(doc_cache_file)
+
 @DOCSTRING(suppress_verbose_help_message)
 
 @node Command Line Editing
--- a/scripts/help/doc.m
+++ b/scripts/help/doc.m
@@ -24,7 +24,7 @@
 ## any arguments, the manual is shown from the beginning.
 ##
 ## For example, the command @kbd{doc rand} starts the GNU Info browser
-## at this node in the on-line version of the manual.
+## at the @code{rand} node in the on-line version of the manual.
 ##
 ## Once the GNU Info browser is running, help for using it is available
 ## using the command @kbd{C-h}.
--- a/scripts/help/help.m
+++ b/scripts/help/help.m
@@ -26,7 +26,7 @@
 ## The help command can give you information about operators, but not the
 ## comma and semicolons that are used as command separators.  To get help
 ## for those, you must type @kbd{help comma} or @kbd{help semicolon}.
-## @seealso{doc, which, lookfor}
+## @seealso{doc, lookfor, which}
 ## @end deftypefn
 
 function help (name)
--- a/scripts/help/lookfor.m
+++ b/scripts/help/lookfor.m
@@ -17,26 +17,26 @@
 ## -*- texinfo -*-
 ## @deftypefn {Command} lookfor @var{str}
 ## @deftypefnx {Command} lookfor -all @var{str}
-## @deftypefnx {Function} {[@var{fun}, @var{helpstring}] =} lookfor (@var{str})
-## @deftypefnx {Function} {[@var{fun}, @var{helpstring}] =} lookfor ('-all', @var{str})
-## Search for the string @var{str} in all of the functions found in the
-## function search path.  By default @code{lookfor} searches for @var{str}
+## @deftypefnx {Function} {[@var{func}, @var{helpstring}] =} lookfor (@var{str})
+## @deftypefnx {Function} {[@var{func}, @var{helpstring}] =} lookfor ('-all', @var{str})
+## Search for the string @var{str} in all functions found in the current 
+## function search path.  By default, @code{lookfor} searches for @var{str}
 ## in the first sentence of the help string of each function found.  The entire
-## help string of each function found in the path can be searched if
-## the '-all' argument is supplied.  All searches are case insensitive.
+## help text of each function can be searched if the '-all' argument is 
+## supplied.  All searches are case insensitive.
 ## 
-## Called with no output arguments, @code{lookfor} prints the list of matching
-## functions to the terminal.  Otherwise the output arguments @var{fun} and
-## @var{helpstring} define the matching functions and the first sentence of
-## each of their help strings.
+## Called with no output arguments, @code{lookfor} prints the list of 
+## matching functions to the terminal.  Otherwise, the output arguments 
+## @var{func} and @var{helpstring} define the matching functions and the 
+## first sentence of each of their help strings.
 ## 
-## Note that the ability of @code{lookfor} to correctly identify the first
-## sentence of the help of the functions is dependent on the format of the
-## functions help.  All of the functions in Octave itself will correctly
-## find the first sentence, but the same can not be guaranteed for other
-## functions.  Therefore the use of the '-all' argument might be necessary
-## to find related functions that are not part of Octave.
-## @seealso{help, which}
+## The ability of @code{lookfor} to correctly identify the first
+## sentence of the help text is dependent on the format of the
+## function's help.  All Octave core functions are correctly
+## formatted, but the same can not be guaranteed for external packages and
+## user-supplied functions.  Therefore, the use of the '-all' argument may 
+## be necessary to find related functions that are not a part of Octave.
+## @seealso{help, doc, which}
 ## @end deftypefn
 
 function [out_fun, out_help_text] = lookfor (str, extra)
--- a/src/help.cc
+++ b/src/help.cc
@@ -974,8 +974,15 @@
 @deftypefn {Built-in Function} {@var{val} =} doc_cache_file ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} doc_cache_file (@var{new_val})\n\
 Query or set the internal variable that specifies the name of the\n\
-Octave DOC file.  The default value is @code{\"@var{octetcdir}/DOC\"}.\n\
-@seealso{info_program, doc, help, makeinfo_program}\n\
+Octave documentation cache file.  A cache file significantly improves\n\
+the performance of the @code{lookfor} command.  The default value is \n\
+@file{@var{octave-home}/share/octave/@var{version}/etc/doc-cache},\n\
+in which @var{octave-home} is the root directory of the Octave installation,\n\
+and @var{version} is the Octave version number.\n\
+The default value may be overridden by the environment variable\n\
+@w{@code{OCTAVE_DOC_CACHE_FILE}}, or the command line argument\n\
+@samp{--doc-cache-file NAME}.\n\
+@seealso{lookfor, info_program, doc, help, makeinfo_program}\n\
 @end deftypefn")
 {
   return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (doc_cache_file);
@@ -987,8 +994,11 @@
 @deftypefnx {Built-in Function} {@var{old_val} =} info_file (@var{new_val})\n\
 Query or set the internal variable that specifies the name of the\n\
 Octave info file.  The default value is\n\
-@code{\"@var{octave-home}/info/octave.info\"}, in\n\
-which @var{octave-home} is the directory where all of Octave is installed.\n\
+@file{@var{octave-home}/info/octave.info}, in\n\
+which @var{octave-home} is the root directory of the Octave installation.\n\
+The default value may be overridden by the environment variable\n\
+@w{@code{OCTAVE_INFO_FILE}}, or the command line argument\n\
+@samp{--info-file NAME}.\n\
 @seealso{info_program, doc, help, makeinfo_program}\n\
 @end deftypefn")
 {
@@ -1001,13 +1011,13 @@
 @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val})\n\
 Query or set the internal variable that specifies the name of the\n\
 info program to run.  The default value is\n\
-@code{\"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info\"}\n\
-in which @var{octave-home} is the directory where all of Octave is\n\
-installed, @var{version} is the Octave version number, and @var{arch}\n\
+@file{@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info}\n\
+in which @var{octave-home} is the root directory of the Octave installation,\n\
+@var{version} is the Octave version number, and @var{arch}\n\
 is the system type (for example, @code{i686-pc-linux-gnu}).  The\n\
-default initial value may be overridden by the environment variable\n\
-@code{OCTAVE_INFO_PROGRAM}, or the command line argument\n\
-@code{--info-program NAME}.\n\
+default value may be overridden by the environment variable\n\
+@w{@code{OCTAVE_INFO_PROGRAM}}, or the command line argument\n\
+@samp{--info-program NAME}.\n\
 @seealso{info_file, doc, help, makeinfo_program}\n\
 @end deftypefn")
 {
@@ -1019,8 +1029,8 @@
 @deftypefn {Built-in Function} {@var{val} =} makeinfo_program ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} makeinfo_program (@var{new_val})\n\
 Query or set the internal variable that specifies the name of the\n\
-makeinfo program that Octave runs to format help text containing\n\
-Texinfo markup commands.  The default initial value is @code{\"makeinfo\"}.\n\
+program that Octave runs to format help text containing\n\
+Texinfo markup commands.  The default value is @code{makeinfo}.\n\
 @seealso{info_file, info_program, doc, help}\n\
 @end deftypefn")
 {
--- a/src/toplev.cc
+++ b/src/toplev.cc
@@ -1034,6 +1034,7 @@
 DEFUN (atexit, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} atexit (@var{fcn})\n\
+@deftypefnx {Built-in Function} {} atexit (@var{fcn}, @var{flag})\n\
 Register a function to be called when Octave exits.  For example,\n\
 \n\
 @example\n\
@@ -1048,11 +1049,11 @@
 @noindent\n\
 will print the message \"Bye bye\" when Octave exits.\n\
 \n\
-@deftypefnx {Built-in Function} {} atexit (@var{fcn}, @var{flag})\n\
-Register or unregister a function to be called when Octave exits,\n\
-depending on @var{flag}.  If @var{flag} is true, the function is\n\
-registered, if @var{flag} is false, it is unregistered.  For example,\n\
-after registering the function @code{last_words} as above,\n\
+The additional argument @var{flag} will register or unregister\n\
+@var{fcn} from the list of functions to be called when Octave\n\
+exits.  If @var{flag} is true, the function is registered, and if\n\
+@var{flag} is false, it is unregistered.  For example,\n\
+after registering the function @code{last_words} above,\n\
 \n\
 @example\n\
 atexit (\"last_words\", false);\n\
@@ -1060,7 +1061,7 @@
 \n\
 @noindent\n\
 will remove the function from the list and Octave will not call\n\
-the function @code{last_words} when it exits.\n\
+@code{last_words} when it exits.\n\
 \n\
 Note that @code{atexit} only removes the first occurrence of a function\n\
 from the list, so if a function was placed in the list multiple\n\