Split comint into history manipulation and subprocess manipulation.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 23 Sep 1992 23:03:55 +0000 (23:03 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 23 Sep 1992 23:03:55 +0000 (23:03 +0000)
History is used by intmod, but the rest is not available under DOS.

v7/src/edwin/comint.scm
v7/src/edwin/make.scm
v7/src/edwin/process.scm

index 55723fe8c80d26d1fdc6ea625deb2c06302400a3..09af66d156b1176413ac6b6dba868d891363fe4a 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/comint.scm,v 1.13 1992/03/13 10:05:26 cph Exp $
+$Id: comint.scm,v 1.14 1992/09/23 23:03:42 jinx Exp $
 
-Copyright (c) 1991-92 Massachusetts Institute of Technology
+Copyright (c) 1991-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -91,12 +91,7 @@ Good choices:
 This is a good thing to set in mode hooks."
   "^")
 
-(define-variable-per-buffer comint-input-ring-size
-  "Size of input history ring."
-  30)
-
 (define-variable comint-last-input-end "" false)
-(define-variable comint-input-ring "" false)
 
 (define-variable comint-program-name
   "File name of program that is running in this buffer."
@@ -220,80 +215,6 @@ history list.  Default is to save anything that isn't all whitespace."
     (not (re-match-string-forward (re-compile-pattern "\\`\\s *\\'" false)
                                  false (ref-variable syntax-table) string))))
 \f
-(define-command comint-previous-input
-  "Cycle backwards through input history."
-  "*p"
-  (lambda (argument)
-    (let ((point (current-point))
-         (ring (ref-variable comint-input-ring)))
-      (let ((size (+ (ring-size ring) 1)))
-       (let ((index
-              (modulo (+ argument
-                         (command-message-receive comint-input-ring-tag
-                           (lambda (index)
-                             (delete-string (current-mark) point)
-                             index)
-                           (lambda ()
-                             (push-current-mark! point)
-                             (cond ((positive? argument) 0)
-                                   ((negative? argument) 2)
-                                   (else 1)))))
-                      size)))
-         (message (number->string index))
-         (if (positive? index)
-             (insert-string (ring-ref ring (- index 1)) point))
-         (set-command-message! comint-input-ring-tag index))))))
-
-(define comint-input-ring-tag
-  '(COMINT-INPUT-RING))
-        
-(define-command comint-next-input
-  "Cycle forwards through input history."
-  "*p"
-  (lambda (argument)
-    ((ref-command comint-previous-input) (- argument))))
-
-(define-variable comint-last-input-match "" false)
-
-(define-command comint-history-search-backward
-  "Search backwards through the input history for a matching substring."
-  (lambda ()
-    (list (prompt-for-string "History search backward"
-                            (ref-variable comint-last-input-match))))
-  (lambda (string)
-    (comint-history-search string true)))
-
-(define-command comint-history-search-forward
-  "Search forwards through the input history for a matching substring."
-  (lambda ()
-    (list (prompt-for-string "History search forward"
-                            (ref-variable comint-last-input-match))))
-  (lambda (string)
-    (comint-history-search string false)))
-
-(define (comint-history-search string backward?)
-  (let ((ring (ref-variable comint-input-ring))
-       (syntax-table (ref-variable syntax-table))
-       (pattern (re-compile-pattern (re-quote-string string) false)))
-    (let ((size (+ (ring-size ring) 1)))
-      (let ((start
-            (command-message-receive comint-input-ring-tag
-              (lambda (index) index)
-              (lambda () (if backward? 0 size)))))
-       (let loop ((index start))
-         (let ((index (+ index (if backward? 1 -1))))
-           (cond ((if backward? (>= index size) (< index 0))
-                  (set-command-message! comint-input-ring-tag start)
-                  (editor-failure "Not found"))
-                 ((re-search-string-forward pattern
-                                            false
-                                            syntax-table
-                                            (ring-ref ring (- index 1)))
-                  (set-variable! comint-last-input-match string)
-                  ((ref-command comint-previous-input) (- index start)))
-                 (else
-                  (loop index)))))))))
-\f
 (define-command comint-previous-similar-input
   "Reenter the last input that matches the string typed so far.
 If repeated successively, older inputs are reentered.
index 16bdcada4b16f14837baaaf5ef2d9107b350525a..ae6ec7ba0ea69bed21b95ffa971f51f6128c12f1 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/make.scm,v 3.73 1992/08/27 06:48:09 jinx Exp $
+$Id: make.scm,v 3.74 1992/09/23 23:03:22 jinx Exp $
 
 Copyright (c) 1989-1992 Massachusetts Institute of Technology
 
@@ -40,4 +40,4 @@ MIT in each case. |#
  "edwin"
  `((os-type . ,(intern (microcode-identification-item 'OS-NAME-STRING))))
  'QUERY)
-(add-system! (make-system "Edwin" 3 72 '()))
\ No newline at end of file
+(add-system! (make-system "Edwin" 3 74 '()))
\ No newline at end of file
index d8a6862b1d69e7e0070c7779230de5b449444cdd..75631221a7303f619503957c661234a4efcf28ec 100644 (file)
@@ -1,8 +1,8 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/process.scm,v 1.24 1992/05/12 02:43:41 cph Exp $
+;;;    $Id: process.scm,v 1.25 1992/09/23 23:03:55 jinx Exp $
 ;;;
-;;;    Copyright (c) 1991-92 Massachusetts Institute of Technology
+;;;    Copyright (c) 1991-1992 Massachusetts Institute of Technology
 ;;;
 ;;;    This material was developed by the Scheme project at the
 ;;;    Massachusetts Institute of Technology, Department of
 ;;;
 
 ;;;; Subprocess Support
+;; package: (edwin process)
 
 (declare (usual-integrations))
 \f
+(define subprocesses-available? true)
+
 (define (initialize-processes!)
   (set! edwin-processes '())
   (let ((path (get-environment-variable "PATH")))