while (1)
{
- message ("%s(y or n) ", XSTRING (xprompt)->data);
cursor_in_echo_area = 1;
+ message ("%s(y or n) ", XSTRING (xprompt)->data);
obj = read_char (0, 0, 0, Qnil, 0);
cursor_in_echo_area = 0;
def = Flookup_key (map, key);
answer_string = Fsingle_key_description (obj);
- cursor_in_echo_area = -1;
- message ("%s(y or n) %s", XSTRING (xprompt)->data,
- XSTRING (answer_string)->data);
- cursor_in_echo_area = ocech;
-
if (EQ (def, intern ("skip")))
{
answer = 0;
}
UNGCPRO;
- message ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n');
+ if (! noninteractive)
+ {
+ cursor_in_echo_area = -1;
+ message ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n');
+ cursor_in_echo_area = ocech;
+ }
return answer ? Qt : Qnil;
}