aboutsummaryrefslogtreecommitdiff
path: root/compat-28.el
diff options
context:
space:
mode:
Diffstat (limited to 'compat-28.el')
-rw-r--r--compat-28.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/compat-28.el b/compat-28.el
index ae4978d..05217ea 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -518,8 +518,12 @@ as the new values of the bound variables in the recursive invocation."
(cons (car handler)
(funcall tco-progn (cdr handler))))
(nthcdr 3 expr))))
- ((memq (car-safe expr) '(and progn))
- (cons (car expr) (funcall tco-progn (cdr expr))))
+ ((eq (car-safe expr) 'and)
+ (if (cddr expr)
+ (funcall tco `(if ,(cadr expr) ,(cons 'and (cddr expr))))
+ (funcall tco (cadr expr))))
+ ((eq (car-safe expr) 'progn)
+ (cons (car expr) (funcall tco-progn (cdr expr))))
((memq (car-safe expr) '(let let*))
(append (list (car expr) (cadr expr))
(funcall tco-progn (cddr expr))))