summaryrefslogtreecommitdiffstats
path: root/mitscheme.init
diff options
context:
space:
mode:
authorDavid N. Welton <davidw@efn.org>1998-11-09 21:18:01 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:27 -0800
commit926b1b647ac830660933a5e63eb52d4a2552e264 (patch)
treee25db5f6e1441d67f5d9af063432018ee20a5f51 /mitscheme.init
parentb21cac3362022718634f7086964208b2eed8e897 (diff)
parentfa3f23105ddcf07c5900de47f19af43d1db1b597 (diff)
downloadslib-926b1b647ac830660933a5e63eb52d4a2552e264.tar.gz
slib-926b1b647ac830660933a5e63eb52d4a2552e264.zip
Import Debian changes 2c3-3debian/2c3-3
slib (2c3-3) frozen unstable; urgency=low * Fixes #16235. * Fixes #19943. * Fixes #20265. * Fixes #24917. * Fixes #27389. slib (2c3-2) frozen unstable; urgency=low * Re-uploaded for slink freeze. slib (2c3-1) unstable; urgency=low * New upstream release.
Diffstat (limited to 'mitscheme.init')
-rw-r--r--mitscheme.init39
1 files changed, 22 insertions, 17 deletions
diff --git a/mitscheme.init b/mitscheme.init
index 9486c18..bd612b0 100644
--- a/mitscheme.init
+++ b/mitscheme.init
@@ -19,8 +19,10 @@
;;; Make this part of your ~/.scheme.init file.
+(define getenv get-environment-variable)
+
;;; (software-type) should be set to the generic operating system type.
-(define (software-type) 'UNIX)
+(define (software-type) (if (getenv "HOMEDRIVE") 'MS-DOS 'UNIX))
;;; (scheme-implementation-type) should return the name of the scheme
;;; implementation loading this file.
@@ -30,16 +32,14 @@
;;; (scheme-implementation-version) should return a string describing
;;; the version the scheme implementation loading this file.
-(define (scheme-implementation-version) "7.3.0")
-
-;;; *features* should be set to a list of symbols describing features
-;;; of this implementation. See Template.scm for the list of feature
-;;; names.
-
-;the following may not be the Right Thing for this application, since
-;it causes an error (rather than just returning nil) when the environment
-;variable is not defined.
-(define getenv get-environment-variable)
+(define (scheme-implementation-version)
+ (let* ((str (with-output-to-string identify-world))
+ (beg (+ (substring? "Release " str) 8))
+ (rst (substring str beg (string-length str)))
+ (end (string-find-next-char-in-set
+ rst
+ (predicate->char-set char-whitespace?))))
+ (substring rst 0 end)))
;;; (implementation-vicinity) should be defined to be the pathname of
;;; the directory where any auxillary files to your Scheme
@@ -47,7 +47,8 @@
(define (implementation-vicinity)
(case (software-type)
- ((UNIX) "/usr/local/src/scheme/")
+ ((MS-DOS) "c:\\scheme\\")
+ ((UNIX) "/usr/local/lib/mit-scheme/")
((VMS) "scheme$src:")))
;;; (library-vicinity) should be defined to be the pathname of the
@@ -58,9 +59,9 @@
(or (getenv "SCHEME_LIBRARY_PATH")
;; Use this path if your scheme does not support GETENV.
(case (software-type)
+ ((MS-DOS) "c:\\slib\\")
((UNIX) "/usr/local/lib/slib/")
((VMS) "lib$scheme:")
- ((MS-DOS) "C:\\SLIB\\")
(else "")))))
(lambda () library-path)))
@@ -72,6 +73,10 @@
(let ((home-path (getenv "HOME")))
(lambda () home-path)))
+;;; *features* should be set to a list of symbols describing features
+;;; of this implementation. See Template.scm for the list of feature
+;;; names.
+
(define *features*
'(
source ;can load scheme source files
@@ -103,6 +108,7 @@
pretty-print
object->string
trace ;has macros: TRACE and UNTRACE
+ defmacro
compiler
getenv
Xwindows
@@ -165,8 +171,7 @@
;;; Return argument
(define (identity x) x)
-;;; If your implementation provides eval, SLIB:EVAL is single argument
-;;; eval using the top-level (user) environment.
+;;; SLIB:EVAL is single argument eval using the top-level (user) environment.
;(define (slib:eval form) (eval form (repl/environment (nearest-repl))))
(define (slib:eval form) (eval form user-initial-environment))
@@ -253,7 +258,7 @@
;;; Here for backward compatability
-(define (scheme-file-suffix) "")
+(define (scheme-file-suffix) ".scm")
;;; (SLIB:LOAD-SOURCE "foo") should load "foo.scm" or with whatever
;;; suffix all the module files in SLIB have. See feature 'SOURCE.
@@ -270,4 +275,4 @@
(define slib:load slib:load-source)
-(slib:load (in-vicinity (library-vicinity) "require"))
+(slib:load (in-vicinity (library-vicinity) "require.scm"))