changeset 22854:e3e52ba95250

doc: Update Introduction chapter to use newest version of diary() Texinfo. intro.txi: Use newest version of diary() Texinfo.
author Rik <rik@octave.org>
date Thu, 01 Dec 2016 13:33:51 -0800
parents 76fcce30dd32
children f9fdd2f66514
files doc/interpreter/intro.txi
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/intro.txi	Thu Dec 01 04:42:28 2016 -0800
+++ b/doc/interpreter/intro.txi	Thu Dec 01 13:33:51 2016 -0800
@@ -630,6 +630,7 @@
 @deftypefnx {} {} diary on
 @deftypefnx {} {} diary off
 @deftypefnx {} {} diary @var{filename}
+@deftypefnx {} {[@var{status}, @var{diaryfile}] =} diary
 Record a list of all commands @emph{and} the output they produce, mixed
 together just as they appear on the terminal.
 
@@ -637,8 +638,8 @@
 
 @table @asis
 @item on
-Start recording a session in a file called @file{diary} in the
-current working directory.
+Start recording a session in a file called @file{diary} in the current working
+directory.
 
 @item off
 Stop recording the session in the diary file.
@@ -647,7 +648,13 @@
 Record the session in the file named @var{filename}.
 @end table
 
-With no arguments, @code{diary} toggles the current diary state.
+With no input or output arguments, @code{diary} toggles the current diary
+state.
+
+If output arguments are requested, @code{diary} ignores inputs and returns
+the current status.  The boolean @var{status} indicates whether recording is on
+or off, and @var{diaryfile} is the name of the file where the session is
+stored.  
 @seealso{history, evalc}
 @end deftypefn