summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Templeton <robin@terpri.org>2014-08-04 23:17:21 -0400
committerRicardo Wurmus <rekado@elephly.net>2020-04-04 16:24:57 +0200
commit711dc9065f58abf2f9c1aa81c4de9aa258b5d3a4 (patch)
tree639bd1029f69f9297c575dbaa01be92d69d48787
parent014444c74300f2be2dec7706095bfe36a221604c (diff)
degenerate let forms
(Best-ability ChangeLog annotation added by Christopher Allan Webber.) * module/language/elisp/compile-tree-il.scm (let): Conditionally invoke make-body within make-dynlet or just on its own depending on whether or not dynamic? is null?.
-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))