Mercurial > hg > octave-lyh
diff src/input.cc @ 4526:8952973c6837
[project @ 2003-10-02 18:33:58 by jwe]
author | jwe |
---|---|
date | Thu, 02 Oct 2003 18:33:59 +0000 |
parents | fd406afe8a10 |
children | 1db951a4fcd5 |
line wrap: on
line diff
--- a/src/input.cc +++ b/src/input.cc @@ -941,10 +941,20 @@ static void input_event_hook (void) { - if (user_data.is_defined ()) - feval (hook_fcn, user_data, 0); + if (is_valid_function (hook_fcn)) + { + if (user_data.is_defined ()) + feval (hook_fcn, user_data, 0); + else + feval (hook_fcn, octave_value_list (), 0); + } else - feval (hook_fcn, octave_value_list (), 0); + { + hook_fcn = std::string (); + user_data = octave_value (); + + command_editor::set_event_hook (0); + } } DEFUN (input_event_hook, args, ,