--- a/parser.c Sun Apr 01 01:43:46 2001 +0200 +++ b/parser.c Sat Jan 19 19:14:36 2002 +0100 @@ -216,6 +216,7 @@ int init_nest_lvl; bool had_error; int errornest=0; + bool is_default=FALSE; /* Allocate tokz->optstack if it does not yet exist (if it does, * we have been called from an option handler) @@ -283,11 +284,15 @@ TOK_IDENT_VAL(tokens+0)); if(options==NULL) options=lookup_option(common_opts, TOK_IDENT_VAL(tokens+0)); + if(options==NULL && (tokz->flags&TOKZ_DEFAULT_OPTION)){ + options=lookup_option(tokz->optstack[tokz->nest_lvl], "#default"); + is_default=(options!=NULL); + } if(options==NULL){ had_error=TRUE; tokz_warn_error(tokz, tokens->line, E_TOKZ_UNKNOWN_OPTION); - }else{ + }else if(!is_default) { had_error=!check_args(tokz, tokens, ntokens, options->argfmt); }