History never sets prompt default except when explicitly instructed.
authorChris Hanson <org/chris-hanson/cph>
Thu, 28 Jan 1999 06:13:48 +0000 (06:13 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 28 Jan 1999 06:13:48 +0000 (06:13 +0000)
v7/src/edwin/compile.scm

index 92cadc6f60b518f66358cfbf89bc249b38c6531f..7549adca9ca6b932b956f665c9ef5bfb82912889 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: compile.scm,v 1.9 1999/01/28 06:11:07 cph Exp $
+;;; $Id: compile.scm,v 1.10 1999/01/28 06:13:48 cph Exp $
 ;;;
 ;;; Copyright (c) 1992-1999 Massachusetts Institute of Technology
 ;;;
 
 (declare (usual-integrations))
 \f
+(define-variable compile-command
+  "Initial contents of \\[compile] prompt."
+  "make -k"
+  string?)
+
 (define-command compile
   "Compile the program including the current buffer.  Default: run `make'.
 Runs COMMAND, a shell command, in a separate process asynchronously
 with output going to the buffer *compilation*."
   (lambda ()
+    (if (null? (prompt-history-strings 'COMPILE))
+       (set-prompt-history-strings! 'COMPILE
+                                    (list (ref-variable compile-command))))
     (list (prompt-for-string "Compile command" #f
                             'DEFAULT-TYPE 'INSERTED-DEFAULT
                             'HISTORY 'COMPILE