# HG changeset patch # User Roland McGrath # Date 750387208 0 # Node ID 6b7954afe2bf1c5bea5fd29e84d60f09e22d218e # Parent 25d94807689ecb3ffb511ac04ce2e9c1166e00e8 (map-y-or-n-p): Take new optional arg to not set cursor-in-echo-area. diff -r 25d94807689e -r 6b7954afe2bf lisp/map-ynp.el --- a/lisp/map-ynp.el Mon Oct 11 03:52:24 1993 +0000 +++ b/lisp/map-ynp.el Tue Oct 12 00:53:28 1993 +0000 @@ -1,6 +1,6 @@ ;;; map-ynp.el --- General-purpose boolean question-asker. -;;; Copyright (C) 1991, 1992 Free Software Foundation, Inc. +;;; Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. ;; Author: Roland McGrath ;; Keywords: lisp, extensions @@ -33,7 +33,8 @@ ;;; Code: ;;;###autoload -(defun map-y-or-n-p (prompter actor list &optional help action-alist) +(defun map-y-or-n-p (prompter actor list &optional help action-alist + no-cursor-in-echo-area) "Ask a series of boolean questions. Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST. @@ -67,6 +68,9 @@ \"acted upon\", and the next object from LIST is processed. If it returns nil, the prompt is repeated for the same object. +Final optional argument NO-CURSOR-IN-ECHO-AREA non-nil says not to set +`cursor-in-echo-area' while prompting. + This function uses `query-replace-map' to define the standard responses, but not all of the responses which `query-replace' understands are meaningful here. @@ -114,7 +118,7 @@ (progn (setq quit-flag nil) ;; Prompt the user about this object. - (let ((cursor-in-echo-area t)) + (let ((cursor-in-echo-area (not no-cursor-in-echo-area))) (message "%s(y, n, !, ., q, %sor %s) " prompt user-keys (key-description (char-to-string help-char)))