;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Mon Mar 18 02:14:24 1996 ;;; from file /home/fsf/rms/e19/lisp/map-ynp.el ;;; emacs version 19.30.91.2. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`map-ynp.el' was compiled for Emacs 19.29 or later")) #@1922 Ask a series of boolean questions. Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST. LIST is a list of objects, or a function of no arguments to return the next object or nil. If PROMPTER is a string, the prompt is (format PROMPTER OBJECT). If not a string, PROMPTER is a function of one arg (an object from LIST), which returns a string to be used as the prompt for that object. If the return value is not a string, it may be nil to ignore the object or non-nil to act on the object without asking the user. ACTOR is a function of one arg (an object from LIST), which gets called with each object that the user answers `yes' for. If HELP is given, it is a list (OBJECT OBJECTS ACTION), where OBJECT is a string giving the singular noun for an elt of LIST; OBJECTS is the plural noun for elts of LIST, and ACTION is a transitive verb describing ACTOR. The default is ("object" "objects" "act on"). At the prompts, the user may enter y, Y, or SPC to act on that object; n, N, or DEL to skip that object; ! to act on all following objects; ESC or q to exit (skip all following objects); . (period) to act on the current object and then exit; or \[help-command] to get help. If ACTION-ALIST is given, it is an alist (KEY FUNCTION HELP) of extra keys that will be accepted. KEY is a character; FUNCTION is a function of one arg (an object from LIST); HELP is a string. When the user hits KEY, FUNCTION is called. If it returns non-nil, the object is considered "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. Returns the number of actions taken. (defalias 'map-y-or-n-p #[(prompter actor list &optional help action-alist no-cursor-in-echo-area) "À Â\n Â\f ƒ( 9„DÎ !„DÏ !„D :ƒH @Ð=ƒHÑ‚IÒ<ƒ£Õ@!ÕA@!Õ×8!ÛÜ݃zÞßR‚{àáBƒ‹âQ‚ŒãäBåæ'\"BBBBBè +‚Á'ƒ³éê'ë#ÞP‚´ìíîåï'\"0\"BñŽ2;ƒÔÐóô2õBBE2 ƒ 2!‰;ƒÂ6 ƒ÷\f†õ  B\"†þø\n‚?9?Â:;üý þÿ@!!$ˆA üB þÿ@!!C!%ˆ*D ÿ!\"\n\nE=ƒQF‰‚Ö\nG=ƒfH!ˆ T‚Ô\nI=„Ô\ná=ƒˆH!ˆ TJ‰‚Ö\nø=„˜\nK=ƒµè6ÐÂLÓMDEMDF‰‚Ö\nä=ƒç2!ƒÍH!ˆ T ƒÔ2!ƒÍH!ˆ T‚Í\nÖ=ƒ{NOƒ@‚PƒA@‚Qƒ×8‚!RôS‰&éT'U#'…HUôV#R+!ˆŠWqˆX )‘ˆÐÂLÓMDEMDF‰‚ÖY\n!ƒ®\nÀH!ƒ” T‚ÔÐÂLÓMDEMDF‰‚Ö:ƒÜ@Z=ƒÜ\fÐÂLÓMDEMDF‰‚Öü[þÿ@!!\"ˆ\\ ˆ]^!ˆÐÂLÓMDEMDF‰‚ÖƒÔH!ˆ T‚Ô)Â:üì!ˆ) .\f‡" [0 actions nil user-keys mouse-event map prompt char elt tail def use-menus delayed-switch-frame list subrp byte-code-function-p lambda #[nil " ‰‡" [list elt] 2] #[nil "… @A‡" [list elt t] 1] next last-nonmenu-event capitalize help 2 action objects object ("Yes" . act) ("No" . skip) ("Quit" . exit) " " " And Quit" "Do it and Quit" act-and-exit " All " "Do All" automatic mapcar #[(elt) "ÀÁ\n8!Ã\nA@!B‡" [capitalize 2 elt vector] 3] action-alist t mapconcat #[(elt) "ÀÁ\n@!!‡" [key-description char-to-string elt] 3] ", " "" keymap append #[(elt) "@ÁA@!B‡" [elt vector] 3] query-replace-map ((byte-code "ƒ B‡" [delayed-switch-frame unread-command-events nil] 2)) prompter (object) format (object) quit-flag x-popup-dialog quit no-cursor-in-echo-area message-log-max cursor-in-echo-area message "%s(y, n, !, ., q, %sor %s) " key-description vector help-char read-event "%s(y, n, !, ., q, %sor %s) %s" single-key-description lookup-key exit #[nil "À‡" [nil] 1] act actor skip #[nil "À‡" [nil] 1] exit-prefix setq quote "*Help*" princ "object" "objects" "act on" "Type SPC or `y' to %s the current %s;\nDEL or `n' to skip the current %s;\n! to %s all remaining %s;\nESC or `q' to exit;\n" #[(elt) "ÀÁ\n@Ã\n8#‡" [format "%c to %s" elt 2] 5] ";\n" "or . (period) to %s the current %s and exit." standard-output help-mode vectorp switch-frame "Type %s for help." beep sit-for 1] 10 (#$ . 474)])