about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/lex.c21
2 files changed, 18 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e4d434d1..68a9aea0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-12-14  Peter Stephenson  <pws@csr.com>
 
+	* unposted: Src/lex.c: another neatening of lexflags use for
+	ZLE.
+
 	* 28529: Src/hist.c, Src/lex.c, Src/zsh.h, Src/Zle/compcore.c,
 	Src/Zle/compctl.c, Src/Zle/zle_tricky.c: save and restore
 	lexflags and separate out special word logic for ZLE by
@@ -13955,5 +13958,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5150 $
+* $Revision: 1.5151 $
 *****************************************************
diff --git a/Src/lex.c b/Src/lex.c
index a4d55f49a..3d70c5bbf 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -587,13 +587,20 @@ add(int c)
     }
 }
 
-#define SETPARBEGIN {if (lexflags && !(inbufflags & INP_ALIAS) && zlemetacs >= zlemetall+1-inbufct) parbegin = inbufct;}
-#define SETPAREND {\
-	    if (lexflags && !(inbufflags & INP_ALIAS) && parbegin != -1 && parend == -1) {\
-		if (zlemetacs >= zlemetall + 1 - inbufct)\
-		    parbegin = -1;\
-		else\
-		    parend = inbufct;} }
+#define SETPARBEGIN {							\
+	if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS) &&	\
+	    zlemetacs >= zlemetall+1-inbufct)				\
+	    parbegin = inbufct;		      \
+    }
+#define SETPAREND {						      \
+	if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS) && \
+	    parbegin != -1 && parend == -1) {			      \
+	    if (zlemetacs >= zlemetall + 1 - inbufct)		      \
+		parbegin = -1;					      \
+	    else						      \
+		parend = inbufct;				      \
+	}							      \
+    }
 
 /*
  * Return 1 for math, 0 for a command, 2 for an error.  If it couldn't be