aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/map-ynp.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el
index a0badd5ed3a..0e3f219c23c 100644
--- a/lisp/map-ynp.el
+++ b/lisp/map-ynp.el
@@ -1,6 +1,6 @@
1;;; map-ynp.el --- General-purpose boolean question-asker. 1;;; map-ynp.el --- General-purpose boolean question-asker.
2 2
3;;; Copyright (C) 1991, 1992 Free Software Foundation, Inc. 3;;; Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
4 4
5;; Author: Roland McGrath <roland@gnu.ai.mit.edu> 5;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
6;; Keywords: lisp, extensions 6;; Keywords: lisp, extensions
@@ -33,7 +33,8 @@
33;;; Code: 33;;; Code:
34 34
35;;;###autoload 35;;;###autoload
36(defun map-y-or-n-p (prompter actor list &optional help action-alist) 36(defun map-y-or-n-p (prompter actor list &optional help action-alist
37 no-cursor-in-echo-area)
37 "Ask a series of boolean questions. 38 "Ask a series of boolean questions.
38Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST. 39Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST.
39 40
@@ -67,6 +68,9 @@ FUNCTION is called. If it returns non-nil, the object is considered
67\"acted upon\", and the next object from LIST is processed. If it returns 68\"acted upon\", and the next object from LIST is processed. If it returns
68nil, the prompt is repeated for the same object. 69nil, the prompt is repeated for the same object.
69 70
71Final optional argument NO-CURSOR-IN-ECHO-AREA non-nil says not to set
72`cursor-in-echo-area' while prompting.
73
70This function uses `query-replace-map' to define the standard responses, 74This function uses `query-replace-map' to define the standard responses,
71but not all of the responses which `query-replace' understands 75but not all of the responses which `query-replace' understands
72are meaningful here. 76are meaningful here.
@@ -114,7 +118,7 @@ Returns the number of actions taken."
114 (progn 118 (progn
115 (setq quit-flag nil) 119 (setq quit-flag nil)
116 ;; Prompt the user about this object. 120 ;; Prompt the user about this object.
117 (let ((cursor-in-echo-area t)) 121 (let ((cursor-in-echo-area (not no-cursor-in-echo-area)))
118 (message "%s(y, n, !, ., q, %sor %s) " 122 (message "%s(y, n, !, ., q, %sor %s) "
119 prompt user-keys 123 prompt user-keys
120 (key-description (char-to-string help-char))) 124 (key-description (char-to-string help-char)))