Current File : //proc/thread-self/root/kunden/usr/share/emacs/27.2/lisp/emacs-lisp/map-ynp.elc |
;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#@1999 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.
(fn PROMPTER ACTOR LIST &optional HELP ACTION-ALIST NO-CURSOR-IN-ECHO-AREA)
(defalias 'map-y-or-n-p #[1539 "C\306\307 \310\211\211\211\211\211C\310\211\211C\311\f\242!\203+ \312\306\313\314\315 \"\316\"\317$\2029 \312\306\320\314\315 \"\321\"\322$C\323 <\203\223 \n\203\223 \205O \324A@!\205Z \324\3178!\325\326\327\330\331\"\203m \332P\202n \333\334B\203} \335Q\202~ \336\337B\340BB\"BB\262\341\262 \262\f\266\202\321 \203\243 \342\343\344#\345P\202\244 \346\262\347 \350\"\210\211\203\313 \211@\351\315@!\315A@!#\210A\266\203\202\257 \210\211\262\262 \312\306\352\314\315!\353\"\317$\216;\203\366 \312\354\355\314\315!\356\"\322\357%\262\262\242 \203\242!\262;\203\310\203&\360\n\206 B\"\206!\361\262\202q?\362\363\364\365@#
\366\315A!!$\210B\203I\367\370\371 !!\210\372 \262\373\232\204I\362\374
\366\315A!!\375\f!%\210)\376 \315 !\"\262\377\267\202\204\201I \240\210\202\366 \242!\210\fT\262
\202\366 \202\366 \242!\210\fT\262
\201J \240\210\202\366 \341\211\"\210\202\366 \242!\203\307\242!\210\fT\262
\242 \203\366 \242!\203\307\242!\210\fT\262
\202\307\202\366 C\310\211\223\210\201K DB\201L EBED\201M F\201N \201O !\211G\310\211\201P @\206\201Q A@\206(\201R \3178\2062\201S \201T \201U \211&\342\201V \346#\201W \201X #Q\266\203!\262rq\210\201Y \310\"\262)\311\201Z !\203w\201Z \"\210)\266*\211\"\210\202\366 9\203\240\201[ !\203\240\201\\ !\210\211\"\210\202\366 \201] !\203\303\306H\242!\203\272\fT\262
\202\366 \211\"\210\202\366 :\203\341@\201^ =\203\341\240\210\211\"\210\202\366 \362\201_ \366\315A!!\"\210\201` \210\201a \201b !\210\211\"\210\202\366 \203\366 \242!\210\fT\262
\202\366 )\310H\203+\362\201c
\"\210\202/\362\346!\210)\f)\266\215\207" [other-window-scroll-buffer last-nonmenu-event use-dialog-box query-replace-map quit-flag cursor-in-echo-area 0 current-message nil functionp make-byte-code "\301\300\242 \240\207" vconcat vector #1=[] 2 "\300\242\205 \301\300\242\300\211\242A\240\210\242\240\210\302\207" [t] 4 #[514 "\211\242\300\301\302\303\304#\305\"\306$\240\207" [make-byte-code 0 "\301\302\240\210\300\242\207" vconcat vector #1# 2] 12 "\n\n(fn ELT NEXT)"] capitalize ("Yes" . act) ("No" . skip) append mapcar #[257 "\301 p\302\303\304\305\306\"\307\"\310$\216\311!\210\312\3108!)\266\202\306A@!B\207" [text-mode-syntax-table syntax-table make-byte-code 0 "r\301q\210\302\300!)\207" vconcat vector [set-syntax-table] 2 set-syntax-table capitalize] 10 "\n\n(fn ELT)"] " This But No More" "Do This But No More" act-and-exit " All " "Do All" automatic (("No For All" . exit)) t mapconcat #[257 "\300\301@!!\207" [key-description vector] 4 "\n\n(fn ELT)"] ", " " " "" make-sparse-keymap set-keymap-parent define-key "\300\242\205 \300\242 B\211\207" [unread-command-events] 257 "\301\300\"\207" [format] "\n\n(fn OBJECT)" x-popup-dialog quit message apply propertize "%s(y, n, !, ., q, %sor %s) " key-description raise-frame window-frame minibuffer-window read-event -1 "%s(y, n, !, ., q, %sor %s) %s" single-key-description lookup-key #s(hash-table size 7 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (exit 375 act 384 skip 399 act-and-exit 402 quit 423 automatic 434 help 488)) minibuffer-prompt-properties help-char minibuffer-auto-raise help-window-point-marker temp-buffer-window-setup-hook temp-buffer-window-show-hook help-window-old-frame standard-output message-log-max #[0 "\300\207" [nil] 1] #[0 "\300\207" [nil] 1] help-mode-setup help-mode-finish selected-frame help-buffer temp-buffer-window-setup princ "object" "objects" "act on" format-message "Type SPC or `y' to %s the current %s;\nDEL or `n' to skip the current %s;\nRET or `q' to skip the current and all remaining %s;\nC-g to quit (cancel the whole command);\n! to %s all remaining %s;\n" #[257 "\300\301\302@!\3038#\207" [format "%s to %s;\n" single-key-description 2] 6 "\n\n(fn ELT)"] format "or . (period) to %s the current %s and exit." temp-buffer-window-show help-window-setup commandp call-interactively vectorp switch-frame "Type %s for help." beep sit-for 1 "%s"] 36 (#$ . 410)])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable read-answer-short funcall function #[0 "\300\207" [auto] 1] "If non-nil, `read-answer' accepts single-character answers.\nIf t, accept short (single key-press) answers to the question.\nIf nil, require long answers. If `auto', accept short answers if\nthe function cell of `yes-or-no-p' is set to `y-or-n-p'." :type (choice (const :tag "Accept short answers" t) (const :tag "Require long answer" nil) (const :tag "Guess preference" auto)) :version "26.2" :group minibuffer] 10)
(defconst read-answer-map--memoize (make-hash-table :weakness 'key :test 'equal))
#@1068 Read an answer either as a complete word or its character abbreviation.
Ask user a question and accept an answer from the list of possible answers.
QUESTION should end in a space; this function adds a list of answers to it.
ANSWERS is an alist with elements in the following format:
(LONG-ANSWER SHORT-ANSWER HELP-MESSAGE)
where
LONG-ANSWER is a complete answer,
SHORT-ANSWER is an abbreviated one-character answer,
HELP-MESSAGE is a string describing the meaning of the answer.
SHORT-ANSWER is not necessarily a single character answer. It can be
also a function key like F1, a character event such as C-M-h, or
a control character like C-h.
Example:
\='(("yes" ?y "perform the action")
("no" ?n "skip to the next")
("all" ?! "accept all remaining without more questions")
("help" ?h "show help")
("quit" ?q "exit"))
When `read-answer-short' is non-nil, accept short answers.
Return a long answer even in case of accepting short ones.
When `use-dialog-box' is t, pop up a dialog window to get user input.
(fn QUESTION ANSWERS)
(defalias 'read-answer #[514 "\306=\203
\307K\310=\202 \311\312\"\203 \202 \313\314\"\315\312\316!\"\317\320\321\322\323\324\325\326!\327\"\330\331%\332##\317\333\321\322\323\334\325\326!\335\"\336\331%\337#\"\205\264 \340 \"\206\264 \341\342 \343\n\"\210\211\203\232 \211@\344\345A@!\203 \326A@!\202\202 A@\322\346\347\325\326!\350\"\351\352\211&#\210A\266\202\202g \210\344\353\322\346\354\325\326!\355\"\356\352\211&#\210\211\262 #\352\311\357 \203\326 \203\326 \f<\203\326
\203\326 \360\361\362\363\"B\"\202\354 \203\345 \364\352\352\365%\202\354 \364\352\211\211\366%\227\211\262\"\204t\211\312\230\203`@\352\211\223\210\367AB\370BBBA\371 C\372\373!\211D\352\211r\373q\210\374\321\322\323\375\325\326!\376\"\377\331%\201E #\201F \261)\262rq\210\201G \352\"\262)\201H \201I !\203Y\201I \"\210)\266*\202\265 \201J \210\201K !\210\201L \356!\210\202\265 \207" [read-answer-short read-answer-map--memoize minibuffer-local-map last-input-event last-nonmenu-event use-dialog-box auto yes-or-no-p y-or-n-p assoc "help" append (("help" 63 "show this help message")) assoc-delete-all copy-alist format "%s(%s) " mapconcat make-byte-code 257 "\300\203 \301A@!\203 \302\303A@\"\207\304A@!\207\211@\207" vconcat vector [characterp format "%c" key-description] 4 "\n\n(fn A)" ", " "Please answer %s." "\301\302\300\203 \303A@!\203 \304A@!\202 \305A@!\202 @\"\207" [format "`%s'" characterp string key-description] 5 " or " gethash puthash make-sparse-keymap set-keymap-parent define-key characterp 0 "\301 \210\300@c\210\302 \207" [delete-minibuffer-contents exit-minibuffer] 1 nil [remap self-insert-command] "\301 \210\302 \210\303\300!\210\304\305!\207" [delete-minibuffer-contents beep message sit-for 2] 2 display-popup-menus-p x-popup-dialog t mapcar #[257 "\300@!@B\207" [capitalize] 3 "\n\n(fn A)"] read-from-minibuffer read-char-history yes-or-no-p-history help-mode-setup help-mode-finish selected-frame temp-buffer-window-setup "*Help*" "Type:\n" "\301\302\300\203 \303A@!\203 \304A@!\202 \305A@!\202 @\300\203, \301\306@\"\202- \307\3108$\207" [format "`%s'%s to %s" characterp string key-description " (%s)" "" 2] 7 help-window-point-marker temp-buffer-window-setup-hook temp-buffer-window-show-hook help-window-old-frame standard-output ",\n" ".\n" temp-buffer-window-show functionp help-window-setup beep message sit-for] 22 (#$ . 7270)])