Erase message when inserting completion. That way,
authorChris Hanson <org/chris-hanson/cph>
Sun, 30 Aug 1998 01:50:29 +0000 (01:50 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 30 Aug 1998 01:50:29 +0000 (01:50 +0000)
STANDARD-COMPLETION consistently writes something in the message area,
eradicating any previous message.

v7/src/edwin/prompt.scm

index f2e4469b1896dc69d586ada9df541398828f3b43..8e83f4acb6d65a440c0870a5585a6c3c576b8cee 100644 (file)
@@ -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...")