From 7e8a0e5e1e46c4ffadc2aa0b85d3c04206ada2a0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 28 Jan 1999 06:10:20 +0000 Subject: [PATCH] History never sets prompt default except when explicitly instructed. --- v7/src/edwin/compile.scm | 11 +++++++---- v7/src/edwin/prompt.scm | 17 ++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/v7/src/edwin/compile.scm b/v7/src/edwin/compile.scm index 61b7113c5..34c525d94 100644 --- a/v7/src/edwin/compile.scm +++ b/v7/src/edwin/compile.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: compile.scm,v 1.7 1999/01/28 06:03:23 cph Exp $ +;;; $Id: compile.scm,v 1.8 1999/01/28 06:10:20 cph Exp $ ;;; ;;; Copyright (c) 1992-1999 Massachusetts Institute of Technology ;;; @@ -35,7 +35,8 @@ with output going to the buffer *compilation*." (list (prompt-for-string "Compile command" (ref-variable compile-command) 'DEFAULT-TYPE 'INSERTED-DEFAULT - 'HISTORY 'COMPILE))) + 'HISTORY 'COMPILE + 'HISTORY-DEFAULT #t))) (lambda (command) (set-variable! compile-command command) (run-compilation command))) @@ -45,7 +46,8 @@ with output going to the buffer *compilation*." (lambda () (list (prompt-for-string "Run grep (with args): " #f 'DEFAULT-TYPE 'INSERTED-DEFAULT - 'HISTORY 'GREP))) + 'HISTORY 'GREP + 'HISTORY-DEFAULT #t))) (lambda (command) (run-compilation (string-append "grep -n " command " /dev/null")))) @@ -54,7 +56,8 @@ with output going to the buffer *compilation*." (lambda () (list (prompt-for-string "Run fgrep (with args): " #f 'DEFAULT-TYPE 'INSERTED-DEFAULT - 'HISTORY 'FGREP))) + 'HISTORY 'FGREP + 'HISTORY-DEFAULT #t))) (lambda (command) (run-compilation (string-append "grep -n " command " /dev/null")))) diff --git a/v7/src/edwin/prompt.scm b/v7/src/edwin/prompt.scm index 5fd687046..a56998964 100644 --- a/v7/src/edwin/prompt.scm +++ b/v7/src/edwin/prompt.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: prompt.scm,v 1.177 1999/01/28 05:59:00 cph Exp $ +;;; $Id: prompt.scm,v 1.178 1999/01/28 06:10:14 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology ;;; @@ -429,14 +429,12 @@ 'SET-PROMPT-HISTORY-STRINGS!)) (set-cdr! (name->history name) strings)) -(define-prompt-option 'HISTORY symbol? - (lambda (options history) - (set-options/history! options history) - (history->default-string options))) +(define-simple-option 'HISTORY symbol?) +(define-simple-option 'HISTORY-INDEX exact-nonnegative-integer?) -(define-prompt-option 'HISTORY-INDEX exact-nonnegative-integer? - (lambda (options index) - (set-options/history-index! options index) +(define-prompt-option 'HISTORY-DEFAULT (lambda (x) x #t) + (lambda (options ignore) + ignore (history->default-string options))) (define (history->default-string options) @@ -933,7 +931,8 @@ Whilst editing the command, the following commands are available: (prompt-for-string "Redo" #f 'DEFAULT-TYPE 'INSERTED-DEFAULT 'HISTORY 'REPEAT-COMPLEX-COMMAND - 'HISTORY-INDEX (- argument 1)))))) + 'HISTORY-INDEX (- argument 1) + 'HISTORY-DEFAULT #t))))) ;;; Password Prompts -- 2.25.1