diff --git a/src/cmp/cmplet.lsp b/src/cmp/cmplet.lsp index 5a958e81a..c33547003 100644 --- a/src/cmp/cmplet.lsp +++ b/src/cmp/cmplet.lsp @@ -231,7 +231,16 @@ (dolist (binding (nreverse bindings)) (bind (cdr binding) (car binding))) - (c2expr body) + (if (and *debug-fun* (>= *debug-fun* 3)) + (let ((*unwind-exit* *unwind-exit*)) + (wt-nl "{") + (let* ((env (build-debug-lexical-env vars))) + (when env (push 'IHS-ENV *unwind-exit*)) + (c2expr body) + (wt-nl "}") + (when env (pop-debug-lexical-env)))) + (c2expr body)) + (when block-p (wt-nl "}")) ) @@ -441,7 +450,15 @@ (c2expr* form))) ) ) - (c2expr body) + (if (and *debug-fun* (>= *debug-fun* 3)) + (let ((*unwind-exit* *unwind-exit*)) + (wt-nl "{") + (let* ((env (build-debug-lexical-env vars))) + (when env (push 'IHS-ENV *unwind-exit*)) + (c2expr body) + (wt-nl "}") + (when env (pop-debug-lexical-env)))) + (c2expr body)) (when block-p (wt-nl "}")) )