Mercurial > hg > octave-nkf
changeset 3968:cef0ea4d1b3a
[project @ 2002-07-01 19:16:01 by jwe]
author | jwe |
---|---|
date | Mon, 01 Jul 2002 19:16:01 +0000 |
parents | 15a0aa0b6c18 |
children | 47972b28e85e |
files | src/ChangeLog src/input.cc src/symtab.h src/variables.cc |
diffstat | 4 files changed, 28 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2002-07-01 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (initialize_command_input): Include (, ), {, and } as + word break characters. + + * variables.cc (looks_like_struct): Don't evaluate text if it is a + function. + + * symtab.h (symbol_record::is_function): Also return true if + symbol is a text function or a mapper function. + 2002-06-28 John W. Eaton <jwe@bevo.che.wisc.edu> * defaults.cc (loadpath): Warn if loadpath doesn't contain
--- a/src/input.cc +++ b/src/input.cc @@ -483,7 +483,7 @@ // XX FIXME XXX -- this needs to include a comma too, but that // causes trouble for the new struct element completion code. - static char *s = "\t\n !\"\'*+-/:;<=>[\\]^`~"; + static char *s = "\t\n !\"\'*+-/:;<=>(){}[\\]^`~"; command_editor::set_basic_word_break_characters (s);
--- a/src/symtab.h +++ b/src/symtab.h @@ -92,6 +92,10 @@ || symbol_type & symbol_record::BUILTIN_VARIABLE); } + // It's not necessary to check for TEXT_FUNCTION and MAPPER_FUNCTION + // here. Those tags are just used as additional qualifiers for + // the other types of functions. + bool is_function (void) const { return (symbol_type & symbol_record::USER_FUNCTION
--- a/src/variables.cc +++ b/src/variables.cc @@ -302,11 +302,20 @@ bool looks_like_struct (const std::string& text) { - int parse_status; + bool retval = false; + + symbol_record *sr = curr_sym_tab->lookup (text); - octave_value tmp = eval_string (text, true, parse_status); + if (sr && ! sr->is_function ()) + { + int parse_status; - return (tmp.is_defined () && tmp.is_map ()); + octave_value tmp = eval_string (text, true, parse_status); + + retval = (tmp.is_defined () && tmp.is_map ()); + } + + return retval; } DEFUN (is_global, args, ,