From 9da3e1c87bf8763060f0281748642c831109dcc2 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 30 Aug 1998 01:50:29 +0000 Subject: [PATCH] Erase message when inserting completion. That way, STANDARD-COMPLETION consistently writes something in the message area, eradicating any previous message. --- v7/src/edwin/prompt.scm | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/v7/src/edwin/prompt.scm b/v7/src/edwin/prompt.scm index f2e4469b1..8e83f4acb 100644 --- a/v7/src/edwin/prompt.scm +++ b/v7/src/edwin/prompt.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: prompt.scm,v 1.170 1998/03/08 07:13:11 cph Exp $ +;;; $Id: prompt.scm,v 1.171 1998/08/30 01:50:29 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-98 Massachusetts Institute of Technology ;;; @@ -599,24 +599,28 @@ a repetition of this command will exit." ;;;; Support for Completion (define (standard-completion prefix complete-string insert-completed-string) - (complete-string prefix - (lambda (completion) - (if (not (string=? prefix completion)) - (insert-completed-string completion) - (completion-message "Sole completion")) - (flush-completions-list)) - (lambda (completion generate-completions) - (cond ((not (string=? prefix completion)) - (insert-completed-string completion) - (flush-completions-list)) - ((ref-variable completion-auto-help) - (pop-up-generated-completions generate-completions)) - (else - (completion-message "Next char not unique")))) - (lambda () - (editor-beep) - (completion-message "No completions") - (flush-completions-list)))) + (let ((insert-completed-string + (lambda (completion) + (insert-completed-string completion) + (completion-message "")))) + (complete-string prefix + (lambda (completion) + (if (not (string=? prefix completion)) + (insert-completed-string completion) + (completion-message "Sole completion")) + (flush-completions-list)) + (lambda (completion generate-completions) + (cond ((not (string=? prefix completion)) + (insert-completed-string completion) + (flush-completions-list)) + ((ref-variable completion-auto-help) + (pop-up-generated-completions generate-completions)) + (else + (completion-message "Next char not unique")))) + (lambda () + (editor-beep) + (completion-message "No completions") + (flush-completions-list))))) (define (pop-up-generated-completions generate-completions) (message "Making completion list...") -- 2.25.1