comparison src/callint.c @ 14:9ee227acff29 r19-15b90

Import from CVS: tag r19-15b90
author cvs
date Mon, 13 Aug 2007 08:48:42 +0200
parents ac2d302a0011
children 859a2309aef8
comparison
equal deleted inserted replaced
13:13c6d0aaafe5 14:9ee227acff29
187 Lisp_Object s = make_string (prompt_start, prompt_length); 187 Lisp_Object s = make_string (prompt_start, prompt_length);
188 struct gcpro gcpro1; 188 struct gcpro gcpro1;
189 189
190 /* Fformat no longer smashes its arg vector, so no need to copy it. */ 190 /* Fformat no longer smashes its arg vector, so no need to copy it. */
191 191
192 if (!strchr ((char *) string_data (XSTRING (s)), '%')) 192 if (!strchr ((char *) XSTRING_DATA (s), '%'))
193 return (s); 193 return (s);
194 GCPRO1 (s); 194 GCPRO1 (s);
195 RETURN_UNGCPRO (emacs_doprnt_string_lisp (0, s, 0, nargs, args)); 195 RETURN_UNGCPRO (emacs_doprnt_string_lisp (0, s, 0, nargs, args));
196 } 196 }
197 197
419 GCPRO2 (function, specs); 419 GCPRO2 (function, specs);
420 420
421 for (;;) 421 for (;;)
422 { 422 {
423 if (STRINGP (specs)) 423 if (STRINGP (specs))
424 prompt_data = (CONST char *) string_data (XSTRING (specs)); 424 prompt_data = (CONST char *) XSTRING_DATA (specs);
425 425
426 if (prompt_data[prompt_index] == '+') 426 if (prompt_data[prompt_index] == '+')
427 error ("`+' is not used in `interactive' for ordinary commands"); 427 error ("`+' is not used in `interactive' for ordinary commands");
428 else if (prompt_data[prompt_index] == '*') 428 else if (prompt_data[prompt_index] == '*')
429 { 429 {
612 { 612 {
613 Lisp_Object tem; 613 Lisp_Object tem;
614 int shadowing_speccount = specpdl_depth (); 614 int shadowing_speccount = specpdl_depth ();
615 615
616 specbind (Qcursor_in_echo_area, Qt); 616 specbind (Qcursor_in_echo_area, Qt);
617 message ("%s", string_data (XSTRING (PROMPT ()))); 617 message ("%s", XSTRING_DATA (PROMPT ()));
618 tem = (call0 (Qread_char)); 618 tem = (call0 (Qread_char));
619 args[argnum] = tem; 619 args[argnum] = tem;
620 /* visargs[argnum] = Fsingle_key_description (tem); */ 620 /* visargs[argnum] = Fsingle_key_description (tem); */
621 /* FSF has visargs[argnum] = Fchar_to_string (tem); */ 621 /* FSF has visargs[argnum] = Fchar_to_string (tem); */
622 622
863 visargs[argnum] = args[argnum]; 863 visargs[argnum] = args[argnum];
864 864
865 if (!prompt_limit) 865 if (!prompt_limit)
866 break; 866 break;
867 if (STRINGP (specs)) 867 if (STRINGP (specs))
868 prompt_data = (CONST char *) string_data (XSTRING (specs)); 868 prompt_data = (CONST char *) XSTRING_DATA (specs);
869 prompt_index += prompt_length + 1 + 1; /* +1 to skip spec, +1 for \n */ 869 prompt_index += prompt_length + 1 + 1; /* +1 to skip spec, +1 for \n */
870 } 870 }
871 unbind_to (speccount, Qnil); 871 unbind_to (speccount, Qnil);
872 872
873 QUIT; 873 QUIT;