Mercurial > hg > octave-lyh
comparison libinterp/interpfcn/input.cc @ 16110:7302f8a4df83
use pointer for global lexical_feedback structure
* lex.h, lex.ll (curr_lexer): Rename from lexer_flags.
Declare as pointer. Change all uses.
* lex.h (lexical_feedback): Make copy constructor and operator=
private.
* toplev.cc (main_loop): Protect existing and initialize new
curr_lexer.
* input.cc (get_debug_input): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2013 01:10:08 -0500 |
parents | 229eb14653fd |
children | 4f6c37cfbdce |
comparison
equal
deleted
inserted
replaced
16109:229eb14653fd | 16110:7302f8a4df83 |
---|---|
676 frame.add_fcn (delete_buffer, new_buf); | 676 frame.add_fcn (delete_buffer, new_buf); |
677 | 677 |
678 switch_to_buffer (new_buf); | 678 switch_to_buffer (new_buf); |
679 } | 679 } |
680 | 680 |
681 frame.protect_var (curr_lexer); | |
682 curr_lexer = new lexical_feedback (); | |
683 | |
681 while (Vdebugging) | 684 while (Vdebugging) |
682 { | 685 { |
683 reset_error_handler (); | 686 reset_error_handler (); |
684 | 687 |
685 reset_parser (); | 688 reset_parser (); |
1191 static hook_fcn_map_type hook_fcn_map; | 1194 static hook_fcn_map_type hook_fcn_map; |
1192 | 1195 |
1193 static int | 1196 static int |
1194 input_event_hook (void) | 1197 input_event_hook (void) |
1195 { | 1198 { |
1196 if (! lexer_flags.defining_func) | 1199 if (! curr_lexer->defining_func) |
1197 { | 1200 { |
1198 hook_fcn_map_type::iterator p = hook_fcn_map.begin (); | 1201 hook_fcn_map_type::iterator p = hook_fcn_map.begin (); |
1199 | 1202 |
1200 while (p != hook_fcn_map.end ()) | 1203 while (p != hook_fcn_map.end ()) |
1201 { | 1204 { |