1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-21 12:10:26 +02:00

deprecate fluid-let-syntax in favor of syntax-parameterize

* module/ice-9/psyntax.scm (syntax-parameterize): Rename from
  fluid-let-syntax.

* module/ice-9/psyntax-pp.scm: Regenerate.

* module/ice-9/boot-9.scm (define-inlinable): Use syntax-parameterize
  (and define-syntax-parameter).

* module/ice-9/deprecated.scm (fluid-let-syntax): Add deprecated shim.
This commit is contained in:
Andy Wingo 2011-11-05 13:53:33 +01:00
parent 286dc5e1c3
commit 449bf60b81
4 changed files with 11513 additions and 11460 deletions

View file

@ -3805,13 +3805,13 @@ module '(ice-9 q) '(make-q q-length))}."
((args ...) (generate-temporaries #'(formals ...))))
#`(begin
(define (proc-name formals ...)
(fluid-let-syntax ((name (identifier-syntax proc-name)))
(syntax-parameterize ((name (identifier-syntax proc-name)))
body ...))
(define-syntax name
(define-syntax-parameter name
(lambda (x)
(syntax-case x ()
((_ args ...)
#'((fluid-let-syntax ((name (identifier-syntax proc-name)))
#'((syntax-parameterize ((name (identifier-syntax proc-name)))
(lambda (formals ...)
body ...))
args ...))

View file

@ -1,4 +1,4 @@
;;;; Copyright (C) 2003, 2005, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
;;;; Copyright (C) 2003, 2005, 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -68,7 +68,8 @@
top-repl
turn-on-debugging
read-hash-procedures
process-define-module))
process-define-module
fluid-let-syntax))
;;;; Deprecated definitions.
@ -869,3 +870,12 @@ it.")
imports exports re-exports replacements autoloads))
(else
(unrecognized kws)))))))
(define-syntax fluid-let-syntax
(lambda (x)
(issue-deprecation-warning
"`fluid-let-syntax' is deprecated. Use syntax parameters instead.")
(syntax-case x ()
((_ ((k v) ...) body0 body ...)
#'(syntax-parameterize ((k v) ...)
body0 body ...)))))

File diff suppressed because it is too large Load diff

View file

@ -52,7 +52,7 @@
;;; bound-identifier=?
;;; datum->syntax
;;; define-syntax
;;; fluid-let-syntax
;;; syntax-parameterize
;;; free-identifier=?
;;; generate-temporaries
;;; identifier?
@ -1763,7 +1763,7 @@
(global-extend 'local-syntax 'letrec-syntax #t)
(global-extend 'local-syntax 'let-syntax #f)
(global-extend 'core 'fluid-let-syntax
(global-extend 'core 'syntax-parameterize
(lambda (e r w s mod)
(syntax-case e ()
((_ ((var val) ...) e1 e2 ...)
@ -1773,7 +1773,7 @@
(lambda (id n)
(case (binding-type (lookup n r mod))
((displaced-lexical)
(syntax-violation 'fluid-let-syntax
(syntax-violation 'syntax-parameterize
"identifier out of context"
e
(source-wrap id w s mod)))))
@ -1793,7 +1793,7 @@
r)
w
mod)))
(_ (syntax-violation 'fluid-let-syntax "bad syntax"
(_ (syntax-violation 'syntax-parameterize "bad syntax"
(source-wrap e w s mod))))))
(global-extend 'core 'quote