# HG changeset patch # User Rafael Laboissiere # Date 1234563167 -3600 # Node ID 842c041ba4be56f6131c0cfe3f1a5e2b777ae836 # Parent f5d4b1d6d4e6f1820120c138f4bd92000d9eca4f Only read/save history if Vsave_history is true diff -r f5d4b1d6d4e6 -r 842c041ba4be src/ChangeLog --- a/src/ChangeLog Fri Jan 23 14:10:55 2009 +0100 +++ b/src/ChangeLog Fri Feb 13 23:12:47 2009 +0100 @@ -1,3 +1,10 @@ 2009-01-23 Jaroslav Hajek + + * toplev.cc (do_octave_atexit): Only save history if Vsave_history + is true + * oct-hist.cc (initialize_history): Ditto for reading the history + file + 2009-01-23 Jaroslav Hajek * DLD-FUNCTIONS/ranpd.cc: Use relative tolerance for randp tests. diff -r f5d4b1d6d4e6 -r 842c041ba4be src/oct-hist.cc --- a/src/oct-hist.cc Fri Jan 23 14:10:55 2009 +0100 +++ b/src/oct-hist.cc Fri Feb 13 23:12:47 2009 +0100 @@ -534,7 +534,8 @@ initialize_history (void) command_history::set_file (Vhistory_file); command_history::set_size (Vhistory_size); - command_history::read (false); + if (Vsaving_history) + command_history::read (false); } void diff -r f5d4b1d6d4e6 -r 842c041ba4be src/toplev.cc --- a/src/toplev.cc Fri Jan 23 14:10:55 2009 +0100 +++ b/src/toplev.cc Fri Feb 13 23:12:47 2009 +0100 @@ -643,7 +643,8 @@ do_octave_atexit (void) octave_history_write_timestamp (); - command_history::clean_up_and_save (); + if (Vsaving_history) + command_history::clean_up_and_save (); close_files ();