Mercurial > emacs
changeset 2525:6cf2344e6e7e
(Fy_or_n_p): Echo the answer just once, at exit.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 13 Apr 1993 05:54:00 +0000 |
parents | d026367ad08e |
children | bcba821c17bc |
files | src/fns.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Mon Apr 12 07:54:16 1993 +0000 +++ b/src/fns.c Tue Apr 13 05:54:00 1993 +0000 @@ -1108,8 +1108,8 @@ while (1) { + cursor_in_echo_area = 1; message ("%s(y or n) ", XSTRING (xprompt)->data); - cursor_in_echo_area = 1; obj = read_char (0, 0, 0, Qnil, 0); cursor_in_echo_area = 0; @@ -1120,11 +1120,6 @@ 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; @@ -1161,7 +1156,12 @@ } 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; }