Mercurial > hg > octave-lyh
diff src/variables.cc @ 1907:8c6cea97eb80
[project @ 1996-02-10 01:12:46 by jwe]
author | jwe |
---|---|
date | Sat, 10 Feb 1996 01:17:59 +0000 |
parents | e62277bf5fe0 |
children | 1d4f67de06f4 |
line wrap: on
line diff
--- a/src/variables.cc +++ b/src/variables.cc @@ -672,6 +672,12 @@ return status; } +static void +restore_command_history (void *) +{ + octave_command_history.ignore_entries (! user_pref.saving_history); +} + static int parse_fcn_file (int exec_script, const string& ff) { @@ -707,6 +713,13 @@ if (is_function_file (ffile)) { + // XXX FIXME XXX -- we shouldn't need both the + // octave_command_history object and the + // user_pref.saving_history variable... + octave_command_history.ignore_entries (); + + add_unwind_protect (restore_command_history, 0); + unwind_protect_int (user_pref.echo_executing_commands); unwind_protect_int (user_pref.saving_history); unwind_protect_int (reading_fcn_file);