aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-07-13 00:22:42 +1000
committerGravatar axel <axel@liljencrantz.se>2006-07-13 00:22:42 +1000
commit9e304fa7340b8b74a604564cb44e426cafbe7d34 (patch)
tree4ca660a0d35b26a21b293ae885592b8f2760f316 /parser.c
parent6d9631d0d0798219223026cf1120a83ff2bb25c6 (diff)
Overhaul of the script autoloader. This should make sure that old scripts are unloaded and new scripts are loaded when the fish_function_path and fish_complete_path variables change
darcs-hash:20060712142242-ac50b-3966a0e96a32facc8bc1164d6d0837fc551e4733.gz
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index 85851c9f..1ab7972f 100644
--- a/parser.c
+++ b/parser.c
@@ -443,11 +443,19 @@ void parser_push_block( int type )
blocks should always be skipped. Rather complicated... :-(
*/
new->skip=current_block?current_block->skip:0;
+
+ /*
+ Type TOP and SUBST are never skipped
+ */
if( type == TOP || type == SUBST )
{
new->skip = 0;
}
- if( type == FAKE )
+
+ /*
+ Fake blocks and function definition blocks are never executed
+ */
+ if( type == FAKE || type == FUNCTION_DEF )
{
new->skip = 1;
}
@@ -2065,11 +2073,12 @@ static int parse_job( process_t *p,
forbid = (wchar_t *)(al_get_count( forbidden_function)?al_peek( forbidden_function ):0);
nxt_forbidden = forbid && (wcscmp( forbid, nxt) == 0 );
-
+
/*
Make feeble attempt to avoid infinite recursion. Will at
least catch some accidental infinite recursion calls.
*/
+
if( function_exists( nxt ) && !nxt_forbidden)
{
/*