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 ...)))) ((args ...) (generate-temporaries #'(formals ...))))
#`(begin #`(begin
(define (proc-name formals ...) (define (proc-name formals ...)
(fluid-let-syntax ((name (identifier-syntax proc-name))) (syntax-parameterize ((name (identifier-syntax proc-name)))
body ...)) body ...))
(define-syntax name (define-syntax-parameter name
(lambda (x) (lambda (x)
(syntax-case x () (syntax-case x ()
((_ args ...) ((_ args ...)
#'((fluid-let-syntax ((name (identifier-syntax proc-name))) #'((syntax-parameterize ((name (identifier-syntax proc-name)))
(lambda (formals ...) (lambda (formals ...)
body ...)) body ...))
args ...)) 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 ;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public ;;;; modify it under the terms of the GNU Lesser General Public
@ -68,7 +68,8 @@
top-repl top-repl
turn-on-debugging turn-on-debugging
read-hash-procedures read-hash-procedures
process-define-module)) process-define-module
fluid-let-syntax))
;;;; Deprecated definitions. ;;;; Deprecated definitions.
@ -869,3 +870,12 @@ it.")
imports exports re-exports replacements autoloads)) imports exports re-exports replacements autoloads))
(else (else
(unrecognized kws))))))) (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=? ;;; bound-identifier=?
;;; datum->syntax ;;; datum->syntax
;;; define-syntax ;;; define-syntax
;;; fluid-let-syntax ;;; syntax-parameterize
;;; free-identifier=? ;;; free-identifier=?
;;; generate-temporaries ;;; generate-temporaries
;;; identifier? ;;; identifier?
@ -1763,7 +1763,7 @@
(global-extend 'local-syntax 'letrec-syntax #t) (global-extend 'local-syntax 'letrec-syntax #t)
(global-extend 'local-syntax 'let-syntax #f) (global-extend 'local-syntax 'let-syntax #f)
(global-extend 'core 'fluid-let-syntax (global-extend 'core 'syntax-parameterize
(lambda (e r w s mod) (lambda (e r w s mod)
(syntax-case e () (syntax-case e ()
((_ ((var val) ...) e1 e2 ...) ((_ ((var val) ...) e1 e2 ...)
@ -1773,7 +1773,7 @@
(lambda (id n) (lambda (id n)
(case (binding-type (lookup n r mod)) (case (binding-type (lookup n r mod))
((displaced-lexical) ((displaced-lexical)
(syntax-violation 'fluid-let-syntax (syntax-violation 'syntax-parameterize
"identifier out of context" "identifier out of context"
e e
(source-wrap id w s mod))))) (source-wrap id w s mod)))))
@ -1793,7 +1793,7 @@
r) r)
w w
mod))) mod)))
(_ (syntax-violation 'fluid-let-syntax "bad syntax" (_ (syntax-violation 'syntax-parameterize "bad syntax"
(source-wrap e w s mod)))))) (source-wrap e w s mod))))))
(global-extend 'core 'quote (global-extend 'core 'quote