aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-04-13 05:54:00 +0000
committerRichard M. Stallman1993-04-13 05:54:00 +0000
commit09c958741642890ae8fa27bc1cf8e9cbe50ca800 (patch)
tree26caacc5684010138bec7450e53924cbc4c405b9 /src
parent342df1e2476a934a46059fb947ddc2d9361f7b5e (diff)
downloademacs-09c958741642890ae8fa27bc1cf8e9cbe50ca800.tar.gz
emacs-09c958741642890ae8fa27bc1cf8e9cbe50ca800.zip
(Fy_or_n_p): Echo the answer just once, at exit.
Diffstat (limited to 'src')
-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.")
1108 1108
1109 while (1) 1109 while (1)
1110 { 1110 {
1111 message ("%s(y or n) ", XSTRING (xprompt)->data);
1112 cursor_in_echo_area = 1; 1111 cursor_in_echo_area = 1;
1112 message ("%s(y or n) ", XSTRING (xprompt)->data);
1113 1113
1114 obj = read_char (0, 0, 0, Qnil, 0); 1114 obj = read_char (0, 0, 0, Qnil, 0);
1115 cursor_in_echo_area = 0; 1115 cursor_in_echo_area = 0;
@@ -1120,11 +1120,6 @@ Also accepts Space to mean yes, or Delete to mean no.")
1120 def = Flookup_key (map, key); 1120 def = Flookup_key (map, key);
1121 answer_string = Fsingle_key_description (obj); 1121 answer_string = Fsingle_key_description (obj);
1122 1122
1123 cursor_in_echo_area = -1;
1124 message ("%s(y or n) %s", XSTRING (xprompt)->data,
1125 XSTRING (answer_string)->data);
1126 cursor_in_echo_area = ocech;
1127
1128 if (EQ (def, intern ("skip"))) 1123 if (EQ (def, intern ("skip")))
1129 { 1124 {
1130 answer = 0; 1125 answer = 0;
@@ -1161,7 +1156,12 @@ Also accepts Space to mean yes, or Delete to mean no.")
1161 } 1156 }
1162 UNGCPRO; 1157 UNGCPRO;
1163 1158
1164 message ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n'); 1159 if (! noninteractive)
1160 {
1161 cursor_in_echo_area = -1;
1162 message ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n');
1163 cursor_in_echo_area = ocech;
1164 }
1165 1165
1166 return answer ? Qt : Qnil; 1166 return answer ? Qt : Qnil;
1167} 1167}