# HG changeset patch # User Richard M. Stallman # Date 827077229 0 # Node ID 3349089ced146f9c1164a5a739f9c342c6d3966d # Parent cdd8a024f0002a449bf775b536505a0b313fc50b (map-y-or-n-p): Fix previous change. Delete autoload cookie (file is preloaded). diff -r cdd8a024f000 -r 3349089ced14 lisp/map-ynp.el --- a/lisp/map-ynp.el Sun Mar 17 15:38:50 1996 +0000 +++ b/lisp/map-ynp.el Sun Mar 17 15:40:29 1996 +0000 @@ -34,7 +34,6 @@ ;;; Code: -;;;###autoload (defun map-y-or-n-p (prompter actor list &optional help action-alist no-cursor-in-echo-area) "Ask a series of boolean questions. @@ -79,6 +78,8 @@ Returns the number of actions taken." (let* ((actions 0) user-keys mouse-event map prompt char elt tail def + ;; Non-nil means we should use mouse menus to ask. + use-menus delayed-switch-frame (next (if (or (and list (symbolp list)) (subrp list) @@ -108,6 +109,7 @@ (cons (capitalize (nth 2 elt)) (vector (nth 1 elt)))) action-alist)))) + use-menus t mouse-event last-nonmenu-event)) (setq user-keys (if action-alist (concat (mapconcat (function @@ -134,8 +136,8 @@ (cond ((stringp prompt) ;; Prompt the user about this object. (setq quit-flag nil) - (if mouse-event - (setq def (or (x-popup-dialog mouse-event + (if use-menus + (setq def (or (x-popup-dialog (or mouse-event use-menus) (cons prompt map)) 'quit)) ;; Prompt in the echo area.