about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-12-14 10:35:38 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-12-14 10:35:38 +0000
commitebcead7543194819ef3bbd47ef384cabae3c59fc (patch)
tree6b5f55ab93d2b7a01aaa11dbb055e38173e3b70e /Src/lex.c
parenteab4f9a83c74b104bcfa81d574d5f8f8a7a85ad3 (diff)
downloadzsh-ebcead7543194819ef3bbd47ef384cabae3c59fc.tar.gz
zsh-ebcead7543194819ef3bbd47ef384cabae3c59fc.tar.xz
zsh-ebcead7543194819ef3bbd47ef384cabae3c59fc.zip
lexsave/lexrestore lexflags
add new LEXFLAGS_ZLE
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Src/lex.c b/Src/lex.c
index ca48f3e35..a4d55f49a 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -126,7 +126,7 @@ mod_export int noaliases;
  * Note that although it is passed into the lexer as an input, the
  * lexer can set it to zero after finding the word it's searching for.
  * This only happens if the line being parsed actually does come from
- * ZLE.
+ * ZLE, and hence the bit LEXFLAGS_ZLE is set.
  */
 
 /**/
@@ -202,6 +202,7 @@ struct lexstack {
     int isfirstch;
     int histactive;
     int histdone;
+    int lexflags;
     int stophist;
     int hlinesz;
     char *hline;
@@ -258,6 +259,7 @@ lexsave(void)
     ls->isfirstch = isfirstch;
     ls->histactive = histactive;
     ls->histdone = histdone;
+    ls->lexflags = lexflags;
     ls->stophist = stophist;
     stophist = 0;
     if (!lstack) {
@@ -332,6 +334,7 @@ lexrestore(void)
     isfirstch = lstack->isfirstch;
     histactive = lstack->histactive;
     histdone = lstack->histdone;
+    lexflags = lstack->lexflags;
     stophist = lstack->stophist;
     chline = lstack->hline;
     hptr = lstack->hptr;
@@ -1804,7 +1807,7 @@ exalias(void)
 	} else
 	    zshlextext = tokstr;
 
-	if (lexflags && !(inbufflags & INP_ALIAS)) {
+	if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS)) {
 	    int zp = lexflags;
 
 	    gotword();