From 711dc9065f58abf2f9c1aa81c4de9aa258b5d3a4 Mon Sep 17 00:00:00 2001 From: Robin Templeton Date: Mon, 4 Aug 2014 23:17:21 -0400 Subject: 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?. --- module/language/elisp/compile-tree-il.scm | 14 ++++++++------ 1 file 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)) -- cgit v1.2.3