summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-04-13 05:54:00 +0000
committerRichard M. Stallman <rms@gnu.org>1993-04-13 05:54:00 +0000
commitf3da13e8173a96b969b5f8a49e04eaf4ac6b0750 (patch)
tree6d4a4c22bfbb069af668d251fe27ac32f2785a9c /src/fns.c
parent2cb934bbb634f3c9664c7d2d6f7e4a7a9baba58a (diff)
downloademacs-f3da13e8173a96b969b5f8a49e04eaf4ac6b0750.tar.gz
(Fy_or_n_p): Echo the answer just once, at exit.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fns.c b/src/fns.c
index 14a2ce5b229..cca000c148e 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1108,8 +1108,8 @@ Also accepts Space to mean yes, or Delete to mean no.")
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;
@@ -1120,11 +1120,6 @@ Also accepts Space to mean yes, or Delete to mean no.")
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 @@ Also accepts Space to mean yes, or Delete to mean no.")
}
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;
}