Guarantee that the `cd' requested by the Scheme process happens in the
authorChris Hanson <org/chris-hanson/cph>
Fri, 12 Aug 1988 02:41:22 +0000 (02:41 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 12 Aug 1988 02:41:22 +0000 (02:41 +0000)
Scheme process buffer.

etc/xscheme.el

index 206cad06279d680631f3fa3628faffe38f7bfed3..dc8a8a15b3ce96ed136d69c23f86536401724468 100644 (file)
@@ -21,7 +21,7 @@
 ;;; Requires C-Scheme release 5 or later
 ;;; Changes to Control-G handler require runtime version 13.85 or later
 
-;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/etc/xscheme.el,v 1.18 1988/06/07 16:43:10 cph Exp $
+;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/etc/xscheme.el,v 1.19 1988/08/12 02:41:22 cph Exp $
 
 (require 'scheme)
 \f
@@ -734,7 +734,7 @@ When called, the current buffer will be the Scheme process-buffer.")
        xscheme-process-filter:simple-action)
     (?v xscheme-write-value
        xscheme-process-filter:string-action)
-    (?w cd
+    (?w xscheme-cd
        xscheme-process-filter:string-action)
     (?z xscheme-display-process-buffer
        xscheme-process-filter:simple-action)
@@ -860,6 +860,11 @@ the remaining input.")
     ("[Visiting environment]" . "[Evaluator]")
     ("[Environment Inspector]" . "[Where]"))
   "An alist which maps the Scheme command interpreter type to a print string.")
+
+(defun xscheme-cd (directory-string)
+  (save-excursion
+    (set-buffer (xscheme-process-buffer))
+    (cd directory-string)))
 \f
 (defun xscheme-prompt-for-confirmation (prompt-string)
   (xscheme-send-char (if (y-or-n-p prompt-string) ?y ?n)))