| Server IP : 217.160.0.212 / Your IP : 216.73.217.5 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/emacs-lisp/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
#@2870 Ask a boolean question per PROMPTER for each object in LIST, then call ACTOR.
LIST is a list of objects, or a function of no arguments to return the next
object; when it returns nil, the list of objects is considered exhausted.
If PROMPTER is a string, it should be a format string to be used to format
the question as (format PROMPTER OBJECT).
If PROMPTER is not a string, it should be a function of one argument, an
object from LIST, which returns a string to be used as the question for
that object. If the function's return value is not a string, it may be
nil to ignore the object, or non-nil to act on the object with ACTOR
without asking the user.
ACTOR is a function of one argument, an object from LIST,
which gets called with each object for which the user answers `yes'
to the question presented by PROMPTER.
The user's answers to the questions may be one of the following:
- 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.
HELP provides information for displaying help when the user
types \[help-command]. If HELP is given, it should be a list of
the form (OBJECT OBJECTS ACTION), where OBJECT is a string giving
the singular noun describing an element of LIST; OBJECTS is the
plural noun describing several elements of LIST, and ACTION is a
transitive verb describing action by ACTOR on one or more elements
of LIST. If HELP is omitted or nil, it defaults
to ("object" "objects" "act on").
If ACTION-ALIST is given, it is an alist specifying additional keys
that will be accepted as an answer to the questions. Each element
of the alist has the form (KEY FUNCTION HELP), where KEY is a character;
FUNCTION is a function of one argument (an object from LIST); and HELP
is a string. When the user presses KEY, FUNCTION is called; if it
returns non-nil, the object is considered to have been "acted upon",
and `map-y-or-n-p' proceeds to the next object from LIST. If
FUNCTION returns nil, the prompt is re-issued for the same object: this
comes in handy if FUNCTION produces some display that will allow the
user to make an intelligent decision whether the object in question
should be acted upon. If the user types \[help-command], the string
given by HELP is used to describe the effect of KEY.
Optional argument NO-CURSOR-IN-ECHO-AREA, if non-nil, means not to set
`cursor-in-echo-area' while prompting with the questions.
This function uses `query-replace-map' to define the standard responses,
but only some of the responses which `query-replace' understands
are meaningful here, as described above.
The function's value is 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\313
#\202+ \312\314
#C\315 <\203\205 \n\203\205 \205A \316A@!\205L \316\3178!\320\321\322\323\324\"\203_ \325P\202` \326\327B\203o \330Q\202p \331\332B\333BB\"BB\262\334\262 \262\f\266\202\301 \203\225 \335\336\337#\340P\202\226 \341\262\342 \343\"\210\211\203\273 \211@\344\345@!\345A@!#\210A\266\202\202\241 \210\211\262\262 \312\346\"\216;\203\326 \312\347\"\262\262\242 \203\347\242!\262;\203\323\310\203\350\n\206\367 B\"\206\351\262\202Q?\352\353\354\355@#
\356\345A!!$\210B\203)\357\360\361 !!\210\362 \262\363=\204)\352\364
\356\345A!!\365\f!%\210)\366 \345 !\"\262\367\267\202T\370\240\210\202\326 \242!\210\fT\262
\202\326 \202\326 \242!\210\fT\262
\371\240\210\202\326 \334\211\"\210\202\326 \242!\203\243\242!\210\fT\262
\242 \203\326 \242!\203\243\242!\210\fT\262
\202\243\202\326 C\310\211\223\210\372DB\373EBED\374 F\375 \376!\211G\310\211\377@\206\356\201I A@\206\370\201J \3178\206\201K \201L \201M \211&\335\201N \341#\201O \201P #Q\266\203!\262rq\210\201Q \310\"\262)\311\201R !\203G\201R \"\210)\266*\211\"\210\202\326 9\203p\201S !\203p\201T !\210\211\"\210\202\326 \201U !\203\223\306H\242!\203\212\fT\262
\202\326 \211\"\210\202\326 :\203\261@\201V =\203\261\240\210\211\"\210\202\326 \352\201W \356\345A!!\"\210\201X \210\201Y \201Z !\210\211\"\210\202\326 \203\326 \242!\210\fT\262
\202\326 )\310H\203\373\352\201[
\"\210\202\377\352\341!\210)\f)\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-closure #[0 "\301\300\242 \240\207" [V0 V1] 2] #[0 "\300\242\205 \301\300\242\300\211\242A\240\210\242\240\210\302\207" [V0 V1 t] 4] #[514 "\211\242\300\301$\240\207" [make-closure #[0 "\301\302\240\210\300\242\207" [V0 V1 V2] 2]] 9 "\n\n(fn ELT NEXT)"] capitalize 2 ("Yes" . act) ("No" . skip) append mapcar #[257 "\301 p\302\303#\216\304!\210\305\3068!)\266\202\307A@!B\207" [text-mode-syntax-table syntax-table make-closure #[0 "r\301q\210\302\300!)\207" [V0 V1 set-syntax-table] 2] set-syntax-table capitalize 2 vector] 7 "\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 vector #[0 "\300\242\205 \300\242 B\211\207" [V0 unread-command-events] 2] #[257 "\301\300\"\207" [V0 format] 4 "\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 343 act 350 skip 365 act-and-exit 368 quit 387 automatic 398 help 452)) #[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 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 "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 (#$ . 86)])
(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\n`use-short-answers' is non-nil, or the function cell of `yes-or-no-p'\nis 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 \206 \307K\310=\202 \311\312\"\203 \202! \313\314\"\315\312\316!\"\317\320\321\322\323\"\324##\317\325\321\322\326\"\327#\"\205\223 \330\n\"\206\223 \331\332 \333\"\210\211\203\203 \211@\334\335A@!\203s \336A@!\202v A@\322\337\"#\210A\266\202\202[ \210\334\340\322\341\"#\210\211\262\n#\342\311\343 \203\266 \f\203\266
<\203\266 ;\203\266 \344\345\346\347\"B\"\202\314 \203\305 \350\342\342\351%\202\314 \350\342\211\211\352%\227\211\262\"\204:\211\312\230\203,<\342\211\223\210\353=B\354>B>=\355 ?\356\357!\211@\342\211r\357q\210\360\321\322\361
\"\362#\363\261)\262rq\210\364\342\"\262)\365\366!\203%\366\"\210)\266*\202\224 \367 \210\370!\210\371\372!\210\202\224 \207" [read-answer-short use-short-answers read-answer-map--memoize minibuffer-local-map last-input-event last-nonmenu-event 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-closure #[257 "\300\203 \301A@!\203 \302\303A@\"\207\304A@!\207\211@\207" [V0 characterp format "%c" key-description] 4 "\n\n(fn A)"] ", " "Please answer %s." #[257 "\301\302\300\203 \303A@!\203 \304A@!\202 \305A@!\202 @\"\207" [V0 format "`%s'" characterp string key-description] 5 "\n\n(fn A)"] " or " gethash puthash make-sparse-keymap set-keymap-parent define-key characterp vector #[0 "\301 \210\300@c\210\302 \207" [V0 delete-minibuffer-contents exit-minibuffer] 1 nil nil] [remap self-insert-command] #[0 "\301 \210\302 \210\303\300!\210\304\305!\207" [V0 delete-minibuffer-contents beep message sit-for 2] 2 nil nil] nil 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" #[257 "\301\302\300\203 \303A@!\203 \304A@!\202 \305A@!\202 @\300\203, \301\306@\"\202- \307\3108$\207" [V0 format "`%s'%s to %s" characterp string key-description " (%s)" "" 2] 7 "\n\n(fn A)"] ",\n" ".\n" temp-buffer-window-show functionp help-window-setup beep message sit-for 2 use-dialog-box help-window-point-marker temp-buffer-window-setup-hook temp-buffer-window-show-hook help-window-old-frame standard-output] 18 (#$ . 7708)])