comparison 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
comparison
equal deleted inserted replaced
4525:cccd107fa208 4526:8952973c6837
939 static octave_value user_data; 939 static octave_value user_data;
940 940
941 static void 941 static void
942 input_event_hook (void) 942 input_event_hook (void)
943 { 943 {
944 if (user_data.is_defined ()) 944 if (is_valid_function (hook_fcn))
945 feval (hook_fcn, user_data, 0); 945 {
946 if (user_data.is_defined ())
947 feval (hook_fcn, user_data, 0);
948 else
949 feval (hook_fcn, octave_value_list (), 0);
950 }
946 else 951 else
947 feval (hook_fcn, octave_value_list (), 0); 952 {
953 hook_fcn = std::string ();
954 user_data = octave_value ();
955
956 command_editor::set_event_hook (0);
957 }
948 } 958 }
949 959
950 DEFUN (input_event_hook, args, , 960 DEFUN (input_event_hook, args, ,
951 "-*- texinfo -*-\n\ 961 "-*- texinfo -*-\n\
952 @deftypefn {Built-in Function} {[@var{ofcn}, @var{odata}] =} input_event_hook (@var{fcn}, @var{data})\n\ 962 @deftypefn {Built-in Function} {[@var{ofcn}, @var{odata}] =} input_event_hook (@var{fcn}, @var{data})\n\