Mercurial > hg > octave-nkf
changeset 4526:8952973c6837
[project @ 2003-10-02 18:33:58 by jwe]
author | jwe |
---|---|
date | Thu, 02 Oct 2003 18:33:59 +0000 |
parents | cccd107fa208 |
children | c0a23a13eea2 |
files | src/ChangeLog src/input.cc src/variables.cc |
diffstat | 3 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-10-02 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (input_event_hook): Clear the event hook if hook_fcn + does not name a valid function. + 2003-10-01 John W. Eaton <jwe@bevo.che.wisc.edu> * mappers.cc (xabs): New function.
--- 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, ,
--- a/src/variables.cc +++ b/src/variables.cc @@ -1435,7 +1435,7 @@ DEFCMD (mlock, args, , "-*- texinfo -*-\n\ -@deftypefnx {Built-in Function} {} mlock (@var{name})\n\ +@deftypefn {Built-in Function} {} mlock (@var{name})\n\ Lock the named function into memory. If no function is named\n\ then lock in the current function.\n\ @end deftypefn\n\