changeset 4878:57c506c597b9

(read_key_sequence): Arg prompt is now a Lisp object. Pass it to functions found in function-key-map and key-translation-map. (Fread_key_sequence, command_loop_1): Calls changed.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Oct 1993 23:28:06 +0000
parents 4c51d8a8b09f
children 1774c84aca2e
files src/keyboard.c
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Sun Oct 24 23:21:21 1993 +0000
+++ b/src/keyboard.c	Sun Oct 24 23:28:06 1993 +0000
@@ -994,7 +994,7 @@
 #endif /* 0 */
 
       /* Read next key sequence; i gets its length.  */
-      i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])), 0);
+      i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])), Qnil);
 
       ++num_input_keys;
 
@@ -3715,7 +3715,7 @@
 read_key_sequence (keybuf, bufsize, prompt)
      Lisp_Object *keybuf;
      int bufsize;
-     char *prompt;
+     Lisp_Object prompt;
 {
   int count = specpdl_ptr - specpdl;
 
@@ -3802,8 +3802,8 @@
 
   if (INTERACTIVE)
     {
-      if (prompt)
-	echo_prompt (prompt);
+      if (!NILP (prompt))
+	echo_prompt (XSTRING (prompt)->data);
       else if (cursor_in_echo_area)
 	/* This doesn't put in a dash if the echo buffer is empty, so
 	   you don't always see a dash hanging out in the minibuffer.  */
@@ -3823,7 +3823,7 @@
 
   /* Read the first char of the sequence specially, before setting
      up any keymaps, in case a filter runs and switches buffers on us.  */
-  first_event = read_char (!prompt, 0, submaps, last_nonmenu_event,
+  first_event = read_char (NILP (prompt), 0, submaps, last_nonmenu_event,
 			   &junk);
 #endif /* GOBBLE_FIRST_EVENT */
 
@@ -3935,7 +3935,7 @@
 	{
 	  struct buffer *buf = current_buffer;
 
-	  key = read_char (!prompt, nmaps, submaps, last_nonmenu_event,
+	  key = read_char (NILP (prompt), nmaps, submaps, last_nonmenu_event,
 			   &used_mouse_menu);
 
 	  /* read_char returns t when it shows a menu and the user rejects it.
@@ -4252,7 +4252,7 @@
 		  tem = fkey_next;
 
 		  GCPRO3 (fkey_map, keytran_map, delayed_switch_frame);
-		  fkey_next = call0 (fkey_next);
+		  fkey_next = call1 (fkey_next, prompt);
 		  UNGCPRO;
 		  /* If the function returned something invalid,
 		     barf--don't ignore it.
@@ -4345,7 +4345,7 @@
 		tem = keytran_next;
 
 		GCPRO3 (keytran_map, keytran_map, delayed_switch_frame);
-		keytran_next = call0 (keytran_next);
+		keytran_next = call1 (keytran_next, prompt);
 		UNGCPRO;
 		/* If the function returned something invalid,
 		   barf--don't ignore it.
@@ -4485,8 +4485,7 @@
   if (NILP (continue_echo))
     this_command_key_count = 0;
 
-  i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])),
-			 NILP (prompt) ? 0 : XSTRING (prompt)->data);
+  i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), prompt);
 
   if (i == -1)
     {