diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-12-14 09:59:04 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-12-14 09:59:04 +0000 |
commit | eab4f9a83c74b104bcfa81d574d5f8f8a7a85ad3 (patch) | |
tree | 90ce69fc60a966b5d31ad4700cbd84a72b3c2bed /Src/Zle | |
parent | 5858e79f4d942ab13414f5efaf6f280bac690060 (diff) | |
download | zsh-eab4f9a83c74b104bcfa81d574d5f8f8a7a85ad3.tar.gz zsh-eab4f9a83c74b104bcfa81d574d5f8f8a7a85ad3.tar.xz zsh-eab4f9a83c74b104bcfa81d574d5f8f8a7a85ad3.zip |
28528: Rearrange zleparse to lexflags
Add (z+n+)
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 6 | ||||
-rw-r--r-- | Src/Zle/compctl.c | 10 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 16 |
3 files changed, 16 insertions, 16 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 415f91f79..2e983f62c 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1481,7 +1481,7 @@ set_comp_sep(void) /* Put the string in the lexer buffer and call the lexer to * * get the words we have to expand. */ - zleparse = 1; + lexflags = LEXFLAGS_ACTIVE; ocs = zlemetacs; oll = zlemetall; ol = zlemetaline; @@ -1616,7 +1616,7 @@ set_comp_sep(void) } else p = NULL; - if (!got && !zleparse) { + if (!got && !lexflags) { DPUTS(!p, "no current word in substr"); got = 1; cur = i; @@ -1634,7 +1634,7 @@ set_comp_sep(void) noaliases = ona; strinend(); inpop(); - errflag = zleparse = 0; + errflag = lexflags = 0; noerrs = ne; lexrestore(); wb = owb; diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index f07f80877..4e28fd67c 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -2789,7 +2789,7 @@ sep_comp_string(char *ss, char *s, int noffs) /* Put the string in the lexer buffer and call the lexer to * * get the words we have to expand. */ - zleparse = 1; + lexflags = LEXFLAGS_ACTIVE; addedx = 1; noerrs = 1; lexsave(); @@ -2828,7 +2828,7 @@ sep_comp_string(char *ss, char *s, int noffs) addlinknode(foo, (p = ztrdup(tokstr))); else p = NULL; - if (!got && !zleparse) { + if (!got && !lexflags) { DPUTS(!p, "no current word in substr"); got = 1; cur = i; @@ -2843,7 +2843,7 @@ sep_comp_string(char *ss, char *s, int noffs) noaliases = ona; strinend(); inpop(); - errflag = zleparse = 0; + errflag = lexflags = 0; noerrs = ne; lexrestore(); wb = owb; @@ -3703,7 +3703,7 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) /* Put the string in the lexer buffer and call the lexer to * * get the words we have to expand. */ - zleparse = 1; + lexflags = LEXFLAGS_ACTIVE; lexsave(); tmpbuf = (char *)zhalloc(strlen(cc->str) + 5); sprintf(tmpbuf, "foo %s", cc->str); /* KLUDGE! */ @@ -3721,7 +3721,7 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd) noaliases = ona; strinend(); inpop(); - errflag = zleparse = 0; + errflag = lexflags = 0; lexrestore(); /* Fine, now do full expansion. */ prefork(foo, 0); diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 3e2a35171..9a63b2738 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1140,7 +1140,7 @@ get_comp_string(void) zsfree(varname); varname = NULL; insubscr = 0; - zleparse = 1; + lexflags = LEXFLAGS_ACTIVE; clwpos = -1; lexsave(); inpush(dupstrspace(linptr), 0, NULL); @@ -1244,7 +1244,7 @@ get_comp_string(void) if (wordpos != redirpos) wordpos = redirpos = 0; } - if (!zleparse && !tt0) { + if (!lexflags && !tt0) { /* This is done when the lexer reached the word the cursor is on. */ tt = tokstr ? dupstring(tokstr) : NULL; @@ -1345,7 +1345,7 @@ get_comp_string(void) (sl - 1) : (zlemetacs_qsub - wb)]); } } while (tok != LEXERR && tok != ENDINPUT && - (tok != SEPER || (zleparse && !tt0))); + (tok != SEPER || (lexflags && !tt0))); /* Calculate the number of words stored in the clwords array. */ clwnum = (tt || !wordpos) ? wordpos : wordpos - 1; zsfree(clwords[clwnum]); @@ -1360,7 +1360,7 @@ get_comp_string(void) } strinend(); inpop(); - errflag = zleparse = 0; + errflag = lexflags = 0; if (parbegin != -1) { /* We are in command or process substitution if we are not in * a $((...)). */ @@ -2707,7 +2707,7 @@ doexpandhist(void) noaliases = ona; strinend(); inpop(); - zleparse = 0; + lexflags = 0; lexrestore(); expanding = 0; @@ -2807,7 +2807,7 @@ getcurcmd(void) int curlincmd; char *s = NULL; - zleparse = 2; + lexflags = LEXFLAGS_ACTIVE; lexsave(); metafy_line(); inpush(dupstrspace(zlemetaline), 0, NULL); @@ -2825,11 +2825,11 @@ getcurcmd(void) cmdwe = zlemetall + 1 - inbufct; } } - while (tok != ENDINPUT && tok != LEXERR && zleparse); + while (tok != ENDINPUT && tok != LEXERR && lexflags); popheap(); strinend(); inpop(); - errflag = zleparse = 0; + errflag = lexflags = 0; unmetafy_line(); lexrestore(); |