;;; -*-Scheme-*-
;;;
-;;; $Id: fileio.scm,v 1.125 1995/04/26 03:22:49 adams Exp $
+;;; $Id: fileio.scm,v 1.126 1995/04/30 07:12:12 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology
;;;
false
boolean?)
-(define initialize-buffer-local-variables!)
-(let ()
-
-(define edwin-environment (->environment '(edwin)))
-
-(define (evaluate sexp)
- (scode-eval (syntax sexp edwin-syntax-table)
- edwin-environment))
+(define initialize-buffer-local-variables!
+ (let ()
+(define (initialize-buffer-local-variables! buffer find-file?)
+ (let ((end (buffer-end buffer)))
+ (let ((start
+ (with-text-clipped
+ (mark- end (ref-variable local-variable-search-limit) 'LIMIT)
+ end
+ (lambda () (backward-one-page end)))))
+ (if start
+ (if (re-search-forward "Edwin Variables:[ \t]*" start end true)
+ (let ((start (re-match-start 0))
+ (end (re-match-end 0)))
+ (if (or (not find-file?)
+ (not (ref-variable inhibit-local-variables buffer))
+ (prompt-for-confirmation?
+ (string-append
+ "Set local variables as specified at end of "
+ (file-namestring (buffer-pathname buffer)))))
+ (parse-local-variables buffer start end))))))))
+\f
(define (parse-local-variables buffer start end)
(let ((prefix (extract-string (line-start start 0) start))
(suffix (extract-string end (line-end end 0))))
(loop m4))))))))
(loop start))))
-\f
-(set! initialize-buffer-local-variables!
-(named-lambda (initialize-buffer-local-variables! buffer find-file?)
- (let ((end (buffer-end buffer)))
- (let ((start
- (with-text-clipped
- (mark- end (ref-variable local-variable-search-limit) 'LIMIT)
- end
- (lambda () (backward-one-page end)))))
- (if start
- (if (re-search-forward "Edwin Variables:[ \t]*" start end true)
- (let ((start (re-match-start 0))
- (end (re-match-end 0)))
- (if (or (not find-file?)
- (not (ref-variable inhibit-local-variables buffer))
- (prompt-for-confirmation?
- (string-append
- "Set local variables as specified at end of "
- (file-namestring (buffer-pathname buffer)))))
- (parse-local-variables buffer start end))))))))))
+
+(define (evaluate sexp)
+ (scode-eval (syntax sexp edwin-syntax-table) edwin-environment))
+
+(define edwin-environment
+ (->environment '(edwin)))
+
+initialize-buffer-local-variables!))
\f
;;;; Output