Mercurial > emacs
comparison src/fns.c @ 25071:31cd7d7a54df
(Fy_or_n_p): Doc fix.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 26 Jul 1999 16:42:38 +0000 |
parents | 95eace73d3ef |
children | 46c21258f1ff |
comparison
equal
deleted
inserted
replaced
25070:b4b6828139fd | 25071:31cd7d7a54df |
---|---|
2379 DEFUN ("y-or-n-p", Fy_or_n_p, Sy_or_n_p, 1, 1, 0, | 2379 DEFUN ("y-or-n-p", Fy_or_n_p, Sy_or_n_p, 1, 1, 0, |
2380 "Ask user a \"y or n\" question. Return t if answer is \"y\".\n\ | 2380 "Ask user a \"y or n\" question. Return t if answer is \"y\".\n\ |
2381 Takes one argument, which is the string to display to ask the question.\n\ | 2381 Takes one argument, which is the string to display to ask the question.\n\ |
2382 It should end in a space; `y-or-n-p' adds `(y or n) ' to it.\n\ | 2382 It should end in a space; `y-or-n-p' adds `(y or n) ' to it.\n\ |
2383 No confirmation of the answer is requested; a single character is enough.\n\ | 2383 No confirmation of the answer is requested; a single character is enough.\n\ |
2384 Also accepts Space to mean yes, or Delete to mean no.\n\ | 2384 Also accepts Space to mean yes, or Delete to mean no. \(Actually, it uses\n\ |
2385 the bindings in query-replace-map; see the documentation of that variable\n\ | |
2386 for more information. In this case, the useful bindings are `act', `skip',\n\ | |
2387 `recenter', and `quit'.\)\n\ | |
2385 \n\ | 2388 \n\ |
2386 Under a windowing system a dialog box will be used if `last-nonmenu-event'\n\ | 2389 Under a windowing system a dialog box will be used if `last-nonmenu-event'\n\ |
2387 is nil.") | 2390 is nil.") |
2388 (prompt) | 2391 (prompt) |
2389 Lisp_Object prompt; | 2392 Lisp_Object prompt; |
2390 { | 2393 { |
2391 register Lisp_Object obj, key, def, answer_string, map; | 2394 register Lisp_Object obj, key, def, map; |
2392 register int answer; | 2395 register int answer; |
2393 Lisp_Object xprompt; | 2396 Lisp_Object xprompt; |
2394 Lisp_Object args[2]; | 2397 Lisp_Object args[2]; |
2395 struct gcpro gcpro1, gcpro2; | 2398 struct gcpro gcpro1, gcpro2; |
2396 int count = specpdl_ptr - specpdl; | 2399 int count = specpdl_ptr - specpdl; |
2440 /* If we need to quit, quit with cursor_in_echo_area = 0. */ | 2443 /* If we need to quit, quit with cursor_in_echo_area = 0. */ |
2441 QUIT; | 2444 QUIT; |
2442 | 2445 |
2443 key = Fmake_vector (make_number (1), obj); | 2446 key = Fmake_vector (make_number (1), obj); |
2444 def = Flookup_key (map, key, Qt); | 2447 def = Flookup_key (map, key, Qt); |
2445 answer_string = Fsingle_key_description (obj); | |
2446 | 2448 |
2447 if (EQ (def, intern ("skip"))) | 2449 if (EQ (def, intern ("skip"))) |
2448 { | 2450 { |
2449 answer = 0; | 2451 answer = 0; |
2450 break; | 2452 break; |