Change M-x execute-extended-command to use name of command character
authorChris Hanson <org/chris-hanson/cph>
Fri, 17 May 1991 00:27:32 +0000 (00:27 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 17 May 1991 00:27:32 +0000 (00:27 +0000)
as prompt.  Take advantage of new feature in prompt-for-string to
eliminate automatic suffix of ": " on the prompt string.

v7/src/edwin/basic.scm

index ee95de4c9032b7743497d8d1262e1cb44955b168..d6e7a1eaa4550b3563083c5c53b7f7a3a9062c43 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/basic.scm,v 1.112 1991/05/16 21:21:07 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/basic.scm,v 1.113 1991/05/17 00:27:32 cph Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology
 ;;;
@@ -186,12 +186,16 @@ It reads another character (a subcommand) and dispatches on it."
 
 (define-command execute-extended-command
   "Read an extended command from the terminal with completion.
-This command reads the name of a function, with completion.  Then the
-function is called.  Completion is done as the function name is typed
+This command reads the name of a command, with completion.  Then the
+command is invoked.  Completion is done as the command name is typed
 For more information type the HELP key while entering the name."
   ()
   (lambda ()
-    (dispatch-on-command (prompt-for-command "M-x") true)))
+    (dispatch-on-command
+     (prompt-for-command
+      ;; Prompt with the name of the command char.
+      (list (string-append (xchar->name (current-command-char)) " ")))
+     true)))
 \f
 ;;;; Errors