mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] associating environments with Scheme file buffers in


From: Taylor Campbell
Subject: [MIT-Scheme-devel] associating environments with Scheme file buffers in Edwin
Date: Fri, 9 Sep 2005 03:49:03 +0000 (UTC)
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+

(I'm not sure whether the correct forum for this is that of MIT Scheme
usage or MIT Scheme development, so I sent this to both.)

The only mechanism I can currently find for automatically associating
evaluation environments with Scheme file buffers in Edwin is the 'find
file initialization' mechanism, whereby one must write a .edwin-ffi or
foo.ffi file usually containing a long expression of the form:

  (standard-scheme-find-file-initialization
   '#(("foo" (bar foo))
      ("baz" (bar baz)) 
      ...))

i.e. a long vector for every file in some system that lists the name
component of the file's pathname and the associated evaluation
environment.  This seems to me considerably more long, tedious, and
centralized than it really need be, and it is also pretty specific to
Edwin, so it's hard to implement an equivalent facility, for instance,
in GNU Emacs (where vectors have a different syntax).

A common convention in the Lisp world is to simply specify a 'package'
local variable in the -*- line, which I do anyway in all of my Lisp
code (both Common Lisp and Scheme (MIT or s48 -- scheme48.el, a mode
specialized for Scheme48, actually already recognizes this)), and
which is pretty much equivalent to what is written in a lot of code in
MIT Scheme's source itself: many files have purely descriptive (though
in a couple cases inaccurate) lines near the top such as

  ;;; package: (runtime pathname)

but this serves no semantic purpose other than to the human.

Would anyone else find it useful to allow a package local variable to
be specified in the -*- line and recognized by Edwin to refer to the
SCHEME-ENVIRONMENT Edwin variable?  For instance, the top of the file
runtime/pathnm.scm, to continue the above example, would no longer be

  #| -*-Scheme-*-

but rather something more like

  #| -*- Mode: Scheme; Package: (runtime pathname) -*-

I could implement this myself and submit a patch if it be deemed
useful to be included built-in to Edwin, but I wanted to see whether
anyone else (particularly the MIT Scheme maintainers) would consider
it useful first, or perhaps why the Edwin find file initialization
mechanism is to be preferred.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]