From 19ef509dcdc532411b24f3505a1f5f16f0d15987 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 9 Jan 2002 05:11:38 +0000 Subject: [PATCH] Change remaining "syntax-table" references to "environment". Delete unused procedure SF/SET-FILE-SYNTAX-TABLE!. --- v7/src/sf/sf.pkg | 5 ++--- v7/src/sf/toplev.scm | 43 ++++++++++++++----------------------------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/v7/src/sf/sf.pkg b/v7/src/sf/sf.pkg index 8786d426f..8a41b423f 100644 --- a/v7/src/sf/sf.pkg +++ b/v7/src/sf/sf.pkg @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: sf.pkg,v 4.15 2001/12/21 18:39:24 cph Exp $ +$Id: sf.pkg,v 4.16 2002/01/09 05:11:38 cph Exp $ -Copyright (c) 1987-1999, 2001 Massachusetts Institute of Technology +Copyright (c) 1987-1999, 2001, 2002 Massachusetts Institute of Technology 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 @@ -52,7 +52,6 @@ USA. sf/default-declarations sf/default-syntax-table sf/pathname-defaulting - sf/set-file-syntax-table! sf/set-usual-integrations-default-deletions! sf/top-level-definitions sf/usual-integrations-default-deletions diff --git a/v7/src/sf/toplev.scm b/v7/src/sf/toplev.scm index 0b9dfdc05..460005f98 100644 --- a/v7/src/sf/toplev.scm +++ b/v7/src/sf/toplev.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: toplev.scm,v 4.21 2001/12/21 18:32:11 cph Exp $ +$Id: toplev.scm,v 4.22 2002/01/09 05:11:21 cph Exp $ -Copyright (c) 1988-2001 Massachusetts Institute of Technology +Copyright (c) 1988-2002 Massachusetts Institute of Technology 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 @@ -58,11 +58,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define sf:noisy? true) -(define (sf/set-file-syntax-table! pathname syntax-table) - (pathname-map/insert! file-info/syntax-table - (pathname/normalize pathname) - syntax-table)) - (define (sf/set-usual-integrations-default-deletions! del-list) (if (not (list-of-symbols? del-list)) (error "sf/set-usual-integrations-default-deletions!: Bad deletion list" @@ -76,13 +71,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (append! (file-info/get-declarations pathname) (list-copy declarations))))) -(define (file-info/find pathname) - (let ((pathname (pathname/normalize pathname))) - (values (pathname-map/lookup file-info/syntax-table - pathname - identity-procedure - (lambda () sf/default-syntax-table)) - (file-info/get-declarations pathname)))) +(define (sf/file-declarations pathname) + (file-info/get-declarations (pathname/normalize pathname))) (define (file-info/get-declarations pathname) (pathname-map/lookup file-info/declarations @@ -93,14 +83,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define (pathname/normalize pathname) (pathname-default-type (merge-pathnames pathname) "scm")) -(define file-info/syntax-table - (pathname-map/make)) - (define file-info/declarations (pathname-map/make)) (define sf/default-syntax-table - false) + system-global-environment) (define sf/default-declarations '()) @@ -120,8 +107,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;;;; File Syntaxer (define (syntax-file input-string bin-string spec-string) - (if (not (or (not sf/default-syntax-table) - (environment? sf/default-syntax-table))) + (if (not (environment? sf/default-syntax-table)) (error "Malformed binding of SF/DEFAULT-SYNTAX-TABLE:" sf/default-syntax-table)) (if (not (list-of-symbols? sf/top-level-definitions)) @@ -134,10 +120,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA bin-string spec-string)) (lambda (input-pathname bin-pathname spec-pathname) - (call-with-values (lambda () (file-info/find input-pathname)) - (lambda (syntax-table declarations) - (sf/internal input-pathname bin-pathname spec-pathname - syntax-table declarations)))))) + (sf/internal input-pathname bin-pathname spec-pathname + sf/default-syntax-table + (sf/file-declarations input-pathname))))) (if (pair? input-string) input-string (list input-string)))) @@ -163,7 +148,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA false))) (define (sf/internal input-pathname bin-pathname spec-pathname - syntax-table declarations) + environment declarations) spec-pathname ;ignored (let ((start-date (get-decoded-time))) (if sf:noisy? @@ -183,11 +168,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ,(decoded-time/minute start-date) ,(decoded-time/second start-date))) (sf/file->scode input-pathname bin-pathname - syntax-table declarations)) + environment declarations)) bin-pathname))) (define (sf/file->scode input-pathname output-pathname - syntax-table declarations) + environment declarations) (fluid-let ((sf/default-externs-pathname (make-pathname (pathname-host input-pathname) (pathname-device input-pathname) @@ -197,7 +182,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 'NEWEST))) (call-with-values (lambda () - (integrate/file input-pathname syntax-table declarations)) + (integrate/file input-pathname environment declarations)) (lambda (expression externs-block externs) (if output-pathname (write-externs-file (pathname-new-type output-pathname @@ -310,7 +295,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define (phase:syntax s-expression environment) (mark-phase "Syntax") - (syntax* s-expression (or environment system-global-environment))) + (syntax* s-expression environment)) (define (phase:transform scode) (mark-phase "Transform") -- 2.25.1