mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-28 16:00:22 +02:00
(let-optional-template, let-keywords-template): Change
"(begin body)" to "(let () body)" for empty bindings, since the former allows "internal defines" in body leak out to the surrounding environment.
This commit is contained in:
parent
d825734e17
commit
c5bc6e2e2e
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
;;;; optargs.scm -- support for optional arguments
|
||||
;;;;
|
||||
;;;; Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This program is free software; you can redistribute it and/or modify
|
||||
;;;; it under the terms of the GNU General Public License as published by
|
||||
|
@ -150,7 +150,7 @@
|
|||
|
||||
(define (let-optional-template REST-ARG BINDINGS BODY let-type)
|
||||
(if (null? BINDINGS)
|
||||
`(begin ,@BODY)
|
||||
`(let () ,@BODY)
|
||||
(let-o-k-template REST-ARG BINDINGS BODY let-type
|
||||
(lambda (optional)
|
||||
`(,(car optional)
|
||||
|
@ -165,7 +165,7 @@
|
|||
|
||||
(define (let-keywords-template REST-ARG ALLOW-OTHER-KEYS? BINDINGS BODY let-type)
|
||||
(if (null? BINDINGS)
|
||||
`(begin ,@BODY)
|
||||
`(let () ,@BODY)
|
||||
(let* ((kb-list-gensym (gensym "kb:G"))
|
||||
(bindfilter (lambda (key)
|
||||
`(,(car key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue