changeset 9134:a3739e27b017

Update section 2.4 of basics.txi
author Rik <rdrider0-list@yahoo.com>
date Fri, 17 Apr 2009 16:38:34 -0700
parents c0cef1436788
children b04f95fabbf9
files doc/ChangeLog doc/interpreter/basics.txi src/defaults.cc src/input.cc src/oct-hist.cc src/pager.cc
diffstat 6 files changed, 49 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-17  Rik  <rdrider0-list@yahoo.com>
+
+	* interpreter/basics.txi: Update help text for sections 2.4 of basics.txi 
+
 2009-04-17  Rik  <rdrider0-list@yahoo.com>
 
 	* interpreter/basics.txi: Update help text for sections 2.2 
--- a/doc/interpreter/basics.txi
+++ b/doc/interpreter/basics.txi
@@ -391,10 +391,13 @@
 @cindex command-line editing
 @cindex editing the command line
 
-Octave uses the GNU readline library to provide an extensive set of
+Octave uses the GNU Readline library to provide an extensive set of
 command-line editing and history features.  Only the most common
-features are described in this manual.  Please see The GNU Readline
-Library manual for more information.
+features are described in this manual.  In addition, all of the editing
+functions can be bound to different key strokes at the user's discretion.  
+This manual assumes no changes from the default Emacs bindings.  See the GNU 
+Readline Library manual for more information on customizing Readline and 
+for a complete feature list.
 
 To insert printing characters (letters, digits, symbols, etc.), simply
 type the character.  Octave will insert the character at the cursor and
@@ -406,11 +409,12 @@
 and then press @key{a}.  In the following sections, control characters
 such as @kbd{Control-a} are written as @kbd{C-a}.
 
-Another set of command-line editing functions use Meta characters.  On
-some terminals, you type @kbd{M-u} by holding down @key{META} and
-pressing @key{u}.  If your terminal does not have a @key{META} key, you
+Another set of command-line editing functions use Meta characters.  To 
+type @kbd{M-u}, hold down the @key{META} key and press @key{u}.  Depending
+on the keyboard, the @key{META} key may be labeled @key{ALT} or
+even @key{WINDOWS}.  If your terminal does not have a @key{META} key, you
 can still type Meta characters using two-character sequences starting
-with @kbd{ESC}.  Thus, to enter @kbd{M-u}, you could type
+with @kbd{ESC}.  Thus, to enter @kbd{M-u}, you would type
 @key{ESC} @key{u}.  The @kbd{ESC} character sequences are also allowed on
 terminals with real Meta keys.  In the following sections, Meta
 characters such as @kbd{Meta-u} are written as @kbd{M-u}.
@@ -462,8 +466,7 @@
 
 @item C-_
 @itemx C-/
-Undo the last thing that you did.  You can undo all the way back to an
-empty line.
+Undo the last action.  You can undo all the way back to an empty line.
 
 @item M-r
 Undo all changes made to this line.  This is like typing the `undo'
@@ -472,8 +475,8 @@
 
 The above table describes the most basic possible keystrokes that you need
 in order to do editing of the input line.  On most terminals, you can
-also use the arrow keys in place of @kbd{C-f} and @kbd{C-b} to move
-forward and backward.
+also use the left and right arrow keys in place of @kbd{C-f} and @kbd{C-b}
+to move forward and backward.
 
 Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves
 forward a word.  It is a loose convention that control keystrokes
@@ -484,9 +487,7 @@
 The function @code{clc} will allow you to clear the screen from within
 Octave programs.
 
-@ifinfo
 @DOCSTRING(clc)
-@end ifinfo
 
 @node Killing and Yanking
 @subsection Killing and Yanking
@@ -638,8 +639,8 @@
 the history as necessary.
 @end table
 
-On most terminals, you can also use the arrow keys in place of @kbd{C-p}
-and @kbd{C-n} to move through the history list.
+On most terminals, you can also use the up and down arrow keys in place 
+of @kbd{C-p} and @kbd{C-n} to move through the history list.
 
 In addition to the keyboard commands for moving through the history
 list, Octave provides three functions for viewing, editing, and
@@ -651,27 +652,34 @@
 
 @DOCSTRING(run_history)
 
-Octave also allows you customize the details of how and where the history
+@noindent
+Octave also allows you customize the details of when, where, and how history
 is saved.
 
+@DOCSTRING(saving_history)
+
 @DOCSTRING(history_file)
 
 @DOCSTRING(history_size)
 
-@DOCSTRING(saving_history)
-
 @DOCSTRING(history_timestamp_format_string)
 
 @DOCSTRING(EDITOR)
 
 @node Customizing readline
 @subsection Customizing @code{readline}
+@cindex @file{~/.inputrc}
+@cindex customizing @code{readline}
+@cindex @code{readline} customization
 
-As mentioned earlier Octave uses the GNU readline library for
-command-line editing and history features.  It is possible to
-customize how readline works through a configuration file.
+Octave uses the GNU Readline library for command-line editing and
+history features.  Readline is very flexible and can be modified through
+a configuration file of commands (See the GNU Readline library for the
+exact command syntax).  The default configuration file is normally
+@file{~/.inputrc}.
 
-@c FIXME -- need a brief description of the ~/.inputrc file here.
+Octave provides two commands for initializing Readline and thereby changing
+the command line behavior.
 
 @DOCSTRING(read_readline_init_file)
 
--- a/src/defaults.cc
+++ b/src/defaults.cc
@@ -403,9 +403,9 @@
 @deftypefn {Built-in Function} {@var{val} =} EDITOR ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} EDITOR (@var{new_val})\n\
 Query or set the internal variable that specifies the editor to\n\
-use with the @code{edit_history} command.  If the environment\n\
-variable @code{EDITOR} is set when Octave starts, its\n\
-value is used as the default.  Otherwise, @code{EDITOR} is set to\n\
+use with the @code{edit_history} command.  The default value is taken from\n\
+the environment variable @w{@code{EDITOR}} when Octave starts.  If the\n\ 
+enironment variable is not initialized, @w{@code{EDITOR}} will be set to\n\
 @code{\"emacs\"}.\n\
 @seealso{edit_history}\n\
 @end deftypefn")
--- a/src/input.cc
+++ b/src/input.cc
@@ -981,8 +981,7 @@
 @end table\n\
 \n\
 @noindent\n\
-If invoked without any arguments, @code{echo} toggles the current echo\n\
-state.\n\
+With no arguments, @code{echo} toggles the current echo state.\n\
 @end deffn")
 {
   octave_value_list retval;
@@ -1295,11 +1294,10 @@
 @deftypefn {Built-in Function} {@var{val} =} PS4 ()\n\
 @deftypefnx {Built-in Function} {@var{old_val} =} PS4 (@var{new_val})\n\
 Query or set the character string used to prefix output produced\n\
-when echoing commands when @code{echo_executing_commands} is enabled.\n\
+when echoing commands is enabled.\n\
 The default value is @code{\"+ \"}.\n\
-@xref{Invoking Octave from the Command Line}, for a description of\n\
-@code{--echo-commands}.\n\
-@seealso{echo_executing_commands, PS1, PS2}\n\
+@xref{Diary and Echo Commands}, for a description of echoing commands.\n\
+@seealso{echo, echo_executing_commands, PS1, PS2}\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (PS4);
@@ -1338,8 +1336,8 @@
 More than one state can be active at once.  For example, a value of 3 is\n\
 equivalent to the command @kbd{echo on all}.\n\
 \n\
-The value of @code{echo_executing_commands} is set by the @kbd{echo}\n\
-command and the command line option @code{--echo-input}.\n\
+The value of @code{echo_executing_commands} may be set by the @kbd{echo}\n\
+command or the command line option @code{--echo-commands}.\n\
 @end deftypefn")
 {
   return SET_INTERNAL_VARIABLE (echo_executing_commands);
--- a/src/oct-hist.cc
+++ b/src/oct-hist.cc
@@ -553,7 +553,7 @@
   "-*- texinfo -*-\n\
 @deffn {Command} edit_history [@var{first}] [@var{last}]\n\
 If invoked with no arguments, @code{edit_history} allows you to edit the\n\
-history list using the editor named by the variable @code{EDITOR}.  The\n\
+history list using the editor named by the variable @w{@code{EDITOR}}.  The\n\
 commands to be edited are first copied to a temporary file.  When you\n\
 exit the editor, Octave executes the commands that remain in the file.\n\
 It is often more convenient to use @code{edit_history} to define functions \n\
@@ -671,7 +671,7 @@
 @deftypefnx {Built-in Function} {@var{old_val} =} history_size (@var{new_val})\n\
 Query or set the internal variable that specifies how many entries\n\
 to store in the history file.  The default value is @code{1024},\n\
-but may be overridden by the environment variable @code{OCTAVE_HISTSIZE}.\n\
+but may be overridden by the environment variable @w{@code{OCTAVE_HISTSIZE}}.\n\
 @seealso{history_file, history_timestamp_format_string, saving_history}\n\
 @end deftypefn")
 {
@@ -692,8 +692,8 @@
 @deftypefnx {Built-in Function} {@var{old_val} =} history_file (@var{new_val})\n\
 Query or set the internal variable that specifies the name of the\n\
 file used to store command history.  The default value is\n\
-@code{\"~/.octave_hist\"}, but may be overridden by the environment\n\
-variable @code{OCTAVE_HISTFILE}.\n\
+@file{~/.octave_hist}, but may be overridden by the environment\n\
+variable @w{@code{OCTAVE_HISTFILE}}.\n\
 @seealso{history_size, saving_history, history_timestamp_format_string}\n\
 @end deftypefn")
 {
--- a/src/pager.cc
+++ b/src/pager.cc
@@ -422,7 +422,7 @@
 DEFUN (diary, args, ,
   "-*- texinfo -*-\n\
 @deffn {Command} diary options\n\
-Create a list of all commands @emph{and} the output they produce, mixed\n\
+Record a list of all commands @emph{and} the output they produce, mixed\n\
 together just as you see them on your terminal.  Valid options are:\n\
 \n\
 @table @code\n\
@@ -437,7 +437,7 @@
 Record your session in the file named @var{file}.\n\
 @end table\n\
 \n\
-Without any arguments, @code{diary} toggles the current diary state.\n\
+With no arguments, @code{diary} toggles the current diary state.\n\
 @end deffn")
 {
   octave_value_list retval;