Remap some prompts to values that look better in the modeline.
authorChris Hanson <org/chris-hanson/cph>
Thu, 2 Jul 1987 20:01:53 +0000 (20:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 2 Jul 1987 20:01:53 +0000 (20:01 +0000)
v7/src/runtime/emacs.scm

index 4a85891ae87622ad8ba980e3685e27f14c4819d5..49bb0fd427ab55b3ecf112747fc2700447ec9179 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/emacs.scm,v 13.42 1987/03/07 17:36:00 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/emacs.scm,v 13.43 1987/07/02 20:01:53 cph Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
 (define (emacs-rep-message string)
   (transmit-signal-with-argument #\m string))
 
-(define (emacs-rep-prompt level string)
-  (transmit-signal-with-argument #\p
-                                (string-append (object->string level)
-                                               " "
-                                               string)))
-
 (define (emacs-rep-value object)
   (transmit-signal-with-argument #\v (object->string object)))
 
     (lambda ()
       (write object))))
 \f
+(define (emacs-rep-prompt level string)
+  (transmit-signal-with-argument
+   #\p
+   (string-append (object->string level)
+                 " "
+                 (let ((entry (assoc string emacs-rep-prompt-alist)))
+                   (if entry
+                       (cdr entry)
+                       string)))))
+
+(define emacs-rep-prompt-alist
+  '(("]=>" . "[Normal REPL]")
+    ("==>" . "[Normal REPL]")
+    ("Eval-in-env-->" . "[Normal REPL]")
+    ("Bkpt->" . "[Breakpoint REPL]")
+    ("Error->" . "[Error REPL]")
+    ("Debug-->" . "[Debugger]")
+    ("Debugger-->" . "[Debugger REPL]")
+    ("Where-->" . "[Environment Inspector]")
+    ("Which-->" . "[Task Inspector]")))
+
 (define (emacs-read-char-immediate)
   (define (loop)
     (let ((char (primitive-read-char-immediate)))