diff options
author | Robin Templeton <robin@terpri.org> | 2014-08-04 23:17:21 -0400 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-04-04 16:24:57 +0200 |
commit | 711dc9065f58abf2f9c1aa81c4de9aa258b5d3a4 (patch) | |
tree | 639bd1029f69f9297c575dbaa01be92d69d48787 /module | |
parent | 014444c74300f2be2dec7706095bfe36a221604c (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?.
Diffstat (limited to 'module')
-rw-r--r-- | module/language/elisp/compile-tree-il.scm | 14 |
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)) |