summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/language/elisp/compile-tree-il.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm
index 1c07f4742..5c08c0933 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -589,12 +589,14 @@
loc
(map car dynamic)
(if (null? lexical)
- (make-dynlet loc
- (map (compose (cut make-const loc <>) car)
- dynamic)
- (map (compose compile-expr cdr)
- dynamic)
- (make-body))
+ (if (null? dynamic)
+ (make-body)
+ (make-dynlet loc
+ (map (compose (cut make-const loc <>) car)
+ dynamic)
+ (map (compose compile-expr cdr)
+ dynamic)
+ (make-body)))
(let* ((lexical-syms (map (lambda (el) (gensym)) lexical))
(dynamic-syms (map (lambda (el) (gensym)) dynamic))
(all-syms (append lexical-syms dynamic-syms))