summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regex.c b/regex.c
index 705ac26d..e61d29d3 100644
--- a/regex.c
+++ b/regex.c
@@ -2251,8 +2251,8 @@ static void print_rec(val exp, val stream, int *semi_flag)
} else if (sym == compound_s) {
for (; args; args = cdr(args)) {
val arg = car(args);
- if (consp(arg) && car(arg) != zeroplus_s && car(arg) != oneplus_s &&
- car(arg) != optional_s && car (arg) != compound_s)
+ if (consp(arg) && (car(arg) == compl_s || car(arg) == and_s ||
+ car(arg) == nongreedy_s))
paren_print_rec(arg, stream, semi_flag);
else
print_rec(arg, stream, semi_flag);