;;; -*-Scheme-*-
;;;
-;;; $Id: basic.scm,v 1.127 1993/02/02 04:34:53 gjr Exp $
+;;; $Id: basic.scm,v 1.128 1993/02/25 02:43:26 gjr Exp $
;;;
;;; Copyright (c) 1986, 1989-1993 Massachusetts Institute of Technology
;;;
;;;; Leaving Edwin
;; Set this to #F to indicate that returning from the editor has the
-;; same effect as calling %EXIT.
+;; same effect as calling %EXIT, or to prevent the editor from
+;; returning to scheme.
(define editor-can-exit? true)
;; Set this to #F to indicate that calling QUIT has the same effect
-;; as calling %EXIT.
+;; as calling %EXIT, or to prevent the editor from suspending to the OS.
(define scheme-can-quit?
- #|
- (not (string=? microcode-id/operating-system-name "dos"))
- |#
- ;; DOS now has a pseudo-suspend
true)
;; Set this to #T to force the exit commands to always prompt for
"P"
(lambda (argument)
(if argument (save-buffer (current-buffer) false))
- (if (not (and scheme-can-quit? (subprocess-job-control-available?)))
+ (if (and scheme-can-quit? (os/scheme-can-quit?))
(editor-error "Scheme cannot be suspended"))
(quit-scheme)))
;;; -*-Scheme-*-
;;;
-;;; $Id: dos.scm,v 1.7 1993/02/02 04:38:46 gjr Exp $
+;;; $Id: dos.scm,v 1.8 1993/02/25 02:42:56 gjr Exp $
;;;
;;; Copyright (c) 1992-1993 Massachusetts Institute of Technology
;;;
(file-attributes/ls-time-string attr) 26 #\Space)
name)))
(insert-string entry point)
- (insert-newline point))))
\ No newline at end of file
+ (insert-newline point))))
+\f
+(define (os/scheme-can-quit?)
+ true)
+
+(define (os/quit)
+ (without-interrupts
+ (lambda ()
+ (with-real-working-directory-pathname
+ (buffer-default-directory (current-buffer))
+ %quit))))
+
+(define (with-real-working-directory-pathname dir thunk)
+ (let ((inside dir)
+ (outside false))
+ (dynamic-wind
+ (lambda ()
+ (set! outside (working-directory-pathname))
+ (set-working-directory-pathname! inside))
+ thunk
+ (lambda ()
+ (set! inside (working-directory-pathname))
+ (set-working-directory-pathname! outside)))))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: editor.scm,v 1.224 1992/09/14 23:12:23 cph Exp $
+;;; $Id: editor.scm,v 1.225 1993/02/25 02:43:42 gjr Exp $
;;;
-;;; Copyright (c) 1986, 1989-1992 Massachusetts Institute of Technology
+;;; Copyright (c) 1986, 1989-1993 Massachusetts Institute of Technology
;;;
;;; This material was developed by the Scheme project at the
;;; Massachusetts Institute of Technology, Department of
(quit-editor-and (lambda () *the-non-printing-object*)))
(define (quit-scheme)
- (quit-editor-and (lambda () (%quit) (edit))))
+ (quit-editor-and (lambda () (os/quit) (edit))))
(define (quit-editor-and thunk)
(call-with-current-continuation
;;; -*-Scheme-*-
;;;
-;;; $Id: unix.scm,v 1.32 1993/02/21 05:55:02 cph Exp $
+;;; $Id: unix.scm,v 1.33 1993/02/25 02:43:08 gjr Exp $
;;;
-;;; Copyright (c) 1989-93 Massachusetts Institute of Technology
+;;; Copyright (c) 1989-1993 Massachusetts Institute of Technology
;;;
;;; This material was developed by the Scheme project at the
;;; Massachusetts Institute of Technology, Department of
(insert-string
(file-namestring
(extract-and-delete-string start (line-end start 0)))
- start))))
\ No newline at end of file
+ start))))
+\f
+(define (os/scheme-can-quit?)
+ (subprocess-job-control-available?))
+
+(define os/quit %quit)
\ No newline at end of file