diff options
| author | Glenn Morris | 2021-04-25 09:16:09 -0700 |
|---|---|---|
| committer | Glenn Morris | 2021-04-25 09:16:09 -0700 |
| commit | 6dabbddb5fc2a605bd23b3460d791b8e63bcf8f7 (patch) | |
| tree | 77bbc2a404b34b8f3a1d733fa64ececabb3d358c | |
| parent | 6f9180ecb6cc681fdc55ec7cea80c5d9140e152c (diff) | |
| parent | 7d5b973959d2ab056f685996ca156bf42b742dc6 (diff) | |
| download | emacs-6dabbddb5fc2a605bd23b3460d791b8e63bcf8f7.tar.gz emacs-6dabbddb5fc2a605bd23b3460d791b8e63bcf8f7.zip | |
Merge from origin/emacs-27
7d5b973959 (origin/emacs-27) * doc/misc/cl.texi (For Clauses): Minor ...
4570781f8d ; * doc/lispref/files.texi (Directory Names): Add missing ...
1b52fd538d Minor update for make-tarball.txt
8efb8491b2 * doc/misc/cl.texi (Iteration Clauses): fix `never' clause...
0873134682 ; Fix Texinfo in last change to minibuf.texi.
cad8913c89 Improve filling-related documentation
2b7eed23eb ; * doc/lispref/keymaps.texi (Easy Menu): Fix typo.
47fc92cefc Fix reference to "yanking" in the main Emacs manual
1789dcdb35 Improve documentation of 'map-y-or-n-p'
| -rw-r--r-- | admin/make-tarball.txt | 14 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 38 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 89 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 15 | ||||
| -rw-r--r-- | lisp/emacs-lisp/map-ynp.el | 86 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 10 |
9 files changed, 159 insertions, 99 deletions
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index c2078955336..2f763a5f937 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt | |||
| @@ -259,8 +259,9 @@ General steps (for each step, check for possible errors): | |||
| 259 | 259 | ||
| 260 | UPDATING THE EMACS WEB PAGES AFTER A RELEASE | 260 | UPDATING THE EMACS WEB PAGES AFTER A RELEASE |
| 261 | 261 | ||
| 262 | As soon as possible after a release, the Emacs web pages should be updated. | 262 | As soon as possible after a release, the Emacs web pages at |
| 263 | (See admin/notes/www for general information.) | 263 | https://www.gnu.org/software/emacs/ should be updated. (See |
| 264 | admin/notes/www for general information.) | ||
| 264 | 265 | ||
| 265 | The pages to update are: | 266 | The pages to update are: |
| 266 | 267 | ||
| @@ -270,7 +271,14 @@ add the new NEWS file as news/NEWS.xx.y | |||
| 270 | 271 | ||
| 271 | For every new release, a banner is displayed on top of the emacs.html | 272 | For every new release, a banner is displayed on top of the emacs.html |
| 272 | page. Uncomment and the release banner in emacs.html. Keep it on the | 273 | page. Uncomment and the release banner in emacs.html. Keep it on the |
| 273 | page for about a month, then comment it again. | 274 | page for about a month, then comment it again. The new release banner |
| 275 | looks like this: | ||
| 276 | |||
| 277 | <div class="release-banner"> | ||
| 278 | <div class="container"> | ||
| 279 | <h2><em>Emacs 27.1 is out</em>, download it <a href="download.html">here</a>!</h2> | ||
| 280 | </div> | ||
| 281 | </div> | ||
| 274 | 282 | ||
| 275 | Regenerate the various manuals in manual/. | 283 | Regenerate the various manuals in manual/. |
| 276 | The scripts admin/make-manuals and admin/upload-manuals summarize the process. | 284 | The scripts admin/make-manuals and admin/upload-manuals summarize the process. |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 925c7019803..590dc42d155 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -159,7 +159,7 @@ Fundamental Editing Commands | |||
| 159 | 159 | ||
| 160 | Important Text-Changing Commands | 160 | Important Text-Changing Commands |
| 161 | * Mark:: The mark: how to delimit a region of text. | 161 | * Mark:: The mark: how to delimit a region of text. |
| 162 | * Killing:: Killing (cutting) and yanking (copying) text. | 162 | * Killing:: Killing (cutting) and yanking (pasting) text. |
| 163 | * Registers:: Saving a text string or a location in the buffer. | 163 | * Registers:: Saving a text string or a location in the buffer. |
| 164 | * Display:: Controlling what text is displayed. | 164 | * Display:: Controlling what text is displayed. |
| 165 | * Search:: Finding or replacing occurrences of a string. | 165 | * Search:: Finding or replacing occurrences of a string. |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 54e16698a74..2c9d486c331 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -502,8 +502,8 @@ text. | |||
| 502 | @cindex mode, Auto Fill | 502 | @cindex mode, Auto Fill |
| 503 | 503 | ||
| 504 | @dfn{Auto Fill} mode is a buffer-local minor mode (@pxref{Minor | 504 | @dfn{Auto Fill} mode is a buffer-local minor mode (@pxref{Minor |
| 505 | Modes}) in which lines are broken automatically at spaces when the | 505 | Modes}) in which lines are broken automatically when the line becomes |
| 506 | line becomes too wide. | 506 | too wide and you type @kbd{@key{SPC}} or @kbd{@key{RET}}. |
| 507 | 507 | ||
| 508 | @table @kbd | 508 | @table @kbd |
| 509 | @item M-x auto-fill-mode | 509 | @item M-x auto-fill-mode |
| @@ -522,12 +522,21 @@ certain major modes, add @code{auto-fill-mode} to the mode hooks | |||
| 522 | (@pxref{Major Modes}). When Auto Fill mode is enabled, the mode | 522 | (@pxref{Major Modes}). When Auto Fill mode is enabled, the mode |
| 523 | indicator @samp{Fill} appears in the mode line (@pxref{Mode Line}). | 523 | indicator @samp{Fill} appears in the mode line (@pxref{Mode Line}). |
| 524 | 524 | ||
| 525 | Auto Fill mode breaks lines automatically at spaces whenever they | 525 | Auto Fill mode breaks lines automatically at the appropriate places |
| 526 | get longer than the desired width. This line breaking occurs only | 526 | whenever lines get longer than the desired width. This line breaking |
| 527 | when you type @key{SPC} or @key{RET}. If you wish to insert a space | 527 | occurs only when you type @kbd{@key{SPC}} or @kbd{@key{RET}}. If you |
| 528 | or newline without permitting line-breaking, type @kbd{C-q @key{SPC}} | 528 | wish to insert a space or newline without permitting line-breaking, |
| 529 | or @kbd{C-q C-j} respectively. Also, @kbd{C-o} inserts a newline | 529 | type @kbd{C-q @key{SPC}} or @kbd{C-q C-j} respectively. Also, |
| 530 | without line breaking. | 530 | @kbd{C-o} inserts a newline without line breaking. |
| 531 | |||
| 532 | @cindex kinsoku line-breaking rules | ||
| 533 | The place where Auto Fill breaks a line depends on the line's | ||
| 534 | characters. For characters from @acronym{ASCII}, Latin, and most | ||
| 535 | other scripts Emacs breaks a line on space characters, to keep the | ||
| 536 | words intact. But for CJK scripts, a line can be broken between any | ||
| 537 | two characters. (If you load the @file{kinsoku} library, Emacs will | ||
| 538 | avoid breaking a line between certain pairs of CJK characters, where | ||
| 539 | special rules prohibit that.) | ||
| 531 | 540 | ||
| 532 | When Auto Fill mode breaks a line, it tries to obey the | 541 | When Auto Fill mode breaks a line, it tries to obey the |
| 533 | @dfn{adaptive fill prefix}: if a fill prefix can be deduced from the | 542 | @dfn{adaptive fill prefix}: if a fill prefix can be deduced from the |
| @@ -549,6 +558,9 @@ described in the next section. | |||
| 549 | (@pxref{Fill Commands}). | 558 | (@pxref{Fill Commands}). |
| 550 | @end ifnottex | 559 | @end ifnottex |
| 551 | 560 | ||
| 561 | A similar feature that wraps long lines automatically at display | ||
| 562 | time is Visual Line Mode (@pxref{Visual Line Mode}). | ||
| 563 | |||
| 552 | @node Fill Commands | 564 | @node Fill Commands |
| 553 | @subsection Explicit Fill Commands | 565 | @subsection Explicit Fill Commands |
| 554 | 566 | ||
| @@ -571,7 +583,11 @@ Center a line. | |||
| 571 | current paragraph. It redistributes the line breaks within the | 583 | current paragraph. It redistributes the line breaks within the |
| 572 | paragraph, and deletes any excess space and tab characters occurring | 584 | paragraph, and deletes any excess space and tab characters occurring |
| 573 | within the paragraph, in such a way that the lines end up fitting | 585 | within the paragraph, in such a way that the lines end up fitting |
| 574 | within a certain maximum width. | 586 | within a certain maximum width. Like Auto Fill mode, this and other |
| 587 | filling commands usually break lines at space characters, but for CJK | ||
| 588 | characters these commands can break a line between almost any two | ||
| 589 | characters, and they can also obey the kinsoku rules. @xref{Auto | ||
| 590 | Fill}. | ||
| 575 | 591 | ||
| 576 | @findex fill-region | 592 | @findex fill-region |
| 577 | Normally, @kbd{M-q} acts on the paragraph where point is, but if | 593 | Normally, @kbd{M-q} acts on the paragraph where point is, but if |
| @@ -645,8 +661,8 @@ or before @samp{)}, @samp{:} or @samp{?}); and | |||
| 645 | even if preceded by a non-whitespace character). | 661 | even if preceded by a non-whitespace character). |
| 646 | 662 | ||
| 647 | Emacs can display an indicator in the @code{fill-column} position | 663 | Emacs can display an indicator in the @code{fill-column} position |
| 648 | using the Display fill column indicator mode | 664 | using the Display fill column indicator mode (@pxref{Displaying |
| 649 | (@pxref{Displaying Boundaries, display-fill-column-indicator}). | 665 | Boundaries, display-fill-column-indicator}). |
| 650 | 666 | ||
| 651 | @node Fill Prefix | 667 | @node Fill Prefix |
| 652 | @subsection The Fill Prefix | 668 | @subsection The Fill Prefix |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index a8b921eb9f2..2033177fbb0 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -2244,7 +2244,7 @@ form. | |||
| 2244 | 2244 | ||
| 2245 | A @dfn{directory name} is a string that must name a directory if it | 2245 | A @dfn{directory name} is a string that must name a directory if it |
| 2246 | names any file at all. A directory is actually a kind of file, and it | 2246 | names any file at all. A directory is actually a kind of file, and it |
| 2247 | has a file name (called the @dfn{directory file name}, which is | 2247 | has a file name (called the @dfn{directory file name}), which is |
| 2248 | related to the directory name but is typically not identical. (This | 2248 | related to the directory name but is typically not identical. (This |
| 2249 | is not quite the same as the usual POSIX terminology.) These two | 2249 | is not quite the same as the usual POSIX terminology.) These two |
| 2250 | names for the same entity are related by a syntactic transformation. | 2250 | names for the same entity are related by a syntactic transformation. |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index cbc94d8c1b3..4097c86f074 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -2920,7 +2920,7 @@ menu item. | |||
| 2920 | 2920 | ||
| 2921 | @item :active @var{enable} | 2921 | @item :active @var{enable} |
| 2922 | @var{enable} is an expression; if it evaluates to @code{nil}, the item | 2922 | @var{enable} is an expression; if it evaluates to @code{nil}, the item |
| 2923 | is make unselectable.. @code{:enable} is an alias for @code{:active}. | 2923 | is made unselectable. @code{:enable} is an alias for @code{:active}. |
| 2924 | 2924 | ||
| 2925 | @item :visible @var{include} | 2925 | @item :visible @var{include} |
| 2926 | @var{include} is an expression; if it evaluates to @code{nil}, the | 2926 | @var{include} is an expression; if it evaluates to @code{nil}, the |
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 7cf2fcf68f2..72f0e5878b4 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -2239,9 +2239,10 @@ This function asks the user a series of questions, reading a | |||
| 2239 | single-character answer in the echo area for each one. | 2239 | single-character answer in the echo area for each one. |
| 2240 | 2240 | ||
| 2241 | The value of @var{list} specifies the objects to ask questions about. | 2241 | The value of @var{list} specifies the objects to ask questions about. |
| 2242 | It should be either a list of objects or a generator function. If it is | 2242 | It should be either a list of objects or a generator function. If it |
| 2243 | a function, it should expect no arguments, and should return either the | 2243 | is a function, it will be called with no arguments, and should return |
| 2244 | next object to ask about, or @code{nil}, meaning to stop asking questions. | 2244 | either the next object to ask about, or @code{nil}, meaning to stop |
| 2245 | asking questions. | ||
| 2245 | 2246 | ||
| 2246 | The argument @var{prompter} specifies how to ask each question. If | 2247 | The argument @var{prompter} specifies how to ask each question. If |
| 2247 | @var{prompter} is a string, the question text is computed like this: | 2248 | @var{prompter} is a string, the question text is computed like this: |
| @@ -2252,19 +2253,20 @@ The argument @var{prompter} specifies how to ask each question. If | |||
| 2252 | 2253 | ||
| 2253 | @noindent | 2254 | @noindent |
| 2254 | where @var{object} is the next object to ask about (as obtained from | 2255 | where @var{object} is the next object to ask about (as obtained from |
| 2255 | @var{list}). | 2256 | @var{list}). @xref{Formatting Strings}, for more information about |
| 2257 | @code{format}. | ||
| 2256 | 2258 | ||
| 2257 | If not a string, @var{prompter} should be a function of one argument | 2259 | If @var{prompter} is not a string, it should be a function of one |
| 2258 | (the next object to ask about) and should return the question text. If | 2260 | argument (the object to ask about) and should return the question text |
| 2259 | the value is a string, that is the question to ask the user. The | 2261 | for that object. If the value @var{prompter} returns is a string, |
| 2260 | function can also return @code{t}, meaning do act on this object (and | 2262 | that is the question to ask the user. The function can also return |
| 2261 | don't ask the user), or @code{nil}, meaning ignore this object (and don't | 2263 | @code{t}, meaning to act on this object without asking the user, or |
| 2262 | ask the user). | 2264 | @code{nil}, which means to silently ignore this object. |
| 2263 | 2265 | ||
| 2264 | The argument @var{actor} says how to act on the answers that the user | 2266 | The argument @var{actor} says how to act on the objects for which the |
| 2265 | gives. It should be a function of one argument, and it is called with | 2267 | user answers yes. It should be a function of one argument, and will |
| 2266 | each object that the user says yes for. Its argument is always an | 2268 | be called with each object from @var{list} for which the user answers |
| 2267 | object obtained from @var{list}. | 2269 | yes. |
| 2268 | 2270 | ||
| 2269 | If the argument @var{help} is given, it should be a list of this form: | 2271 | If the argument @var{help} is given, it should be a list of this form: |
| 2270 | 2272 | ||
| @@ -2274,34 +2276,49 @@ If the argument @var{help} is given, it should be a list of this form: | |||
| 2274 | 2276 | ||
| 2275 | @noindent | 2277 | @noindent |
| 2276 | where @var{singular} is a string containing a singular noun that | 2278 | where @var{singular} is a string containing a singular noun that |
| 2277 | describes the objects conceptually being acted on, @var{plural} is the | 2279 | describes a single object to be acted on, @var{plural} is the |
| 2278 | corresponding plural noun, and @var{action} is a transitive verb | 2280 | corresponding plural noun, and @var{action} is a transitive verb |
| 2279 | describing what @var{actor} does. | 2281 | describing what @var{actor} does with the objects. |
| 2280 | 2282 | ||
| 2281 | If you don't specify @var{help}, the default is @code{("object" | 2283 | If you don't specify @var{help}, it defaults to the list |
| 2282 | "objects" "act on")}. | 2284 | @w{@code{("object" "objects" "act on")}}. |
| 2283 | 2285 | ||
| 2284 | Each time a question is asked, the user may enter @kbd{y}, @kbd{Y}, or | 2286 | Each time a question is asked, the user can answer as follows: |
| 2285 | @key{SPC} to act on that object; @kbd{n}, @kbd{N}, or @key{DEL} to skip | 2287 | |
| 2286 | that object; @kbd{!} to act on all following objects; @key{ESC} or | 2288 | @table @asis |
| 2287 | @kbd{q} to exit (skip all following objects); @kbd{.} (period) to act on | 2289 | @item @kbd{y}, @kbd{Y}, or @kbd{@key{SPC}} |
| 2288 | the current object and then exit; or @kbd{C-h} to get help. These are | 2290 | act on the object |
| 2289 | the same answers that @code{query-replace} accepts. The keymap | 2291 | @item @kbd{n}, @kbd{N}, or @kbd{@key{DEL}} |
| 2290 | @code{query-replace-map} defines their meaning for @code{map-y-or-n-p} | 2292 | skip the object |
| 2291 | as well as for @code{query-replace}; see @ref{Search and Replace}. | 2293 | @item @kbd{!} |
| 2294 | act on all the following objects | ||
| 2295 | @item @kbd{@key{ESC}} or @kbd{q} | ||
| 2296 | exit (skip all following objects) | ||
| 2297 | @item @kbd{.} (period) | ||
| 2298 | act on the object and then exit | ||
| 2299 | @item @kbd{C-h} | ||
| 2300 | get help | ||
| 2301 | @end table | ||
| 2302 | |||
| 2303 | @noindent | ||
| 2304 | These are the same answers that @code{query-replace} accepts. The | ||
| 2305 | keymap @code{query-replace-map} defines their meaning for | ||
| 2306 | @code{map-y-or-n-p} as well as for @code{query-replace}; see | ||
| 2307 | @ref{Search and Replace}. | ||
| 2292 | 2308 | ||
| 2293 | You can use @var{action-alist} to specify additional possible answers | 2309 | You can use @var{action-alist} to specify additional possible answers |
| 2294 | and what they mean. It is an alist of elements of the form | 2310 | and what they mean. If provided, @var{action-alist} should be an |
| 2295 | @code{(@var{char} @var{function} @var{help})}, each of which defines one | 2311 | alist whose elements are of the form @w{@code{(@var{char} |
| 2296 | additional answer. In this element, @var{char} is a character (the | 2312 | @var{function} @var{help})}}. Each of the alist elements defines one |
| 2313 | additional answer. In each element, @var{char} is a character (the | ||
| 2297 | answer); @var{function} is a function of one argument (an object from | 2314 | answer); @var{function} is a function of one argument (an object from |
| 2298 | @var{list}); @var{help} is a string. | 2315 | @var{list}); and @var{help} is a string. When the user responds with |
| 2299 | 2316 | @var{char}, @code{map-y-or-n-p} calls @var{function}. If it returns | |
| 2300 | When the user responds with @var{char}, @code{map-y-or-n-p} calls | 2317 | non-@code{nil}, the object is considered to have been acted upon, and |
| 2301 | @var{function}. If it returns non-@code{nil}, the object is considered | 2318 | @code{map-y-or-n-p} advances to the next object in @var{list}. If it |
| 2302 | acted upon, and @code{map-y-or-n-p} advances to the next object in | 2319 | returns @code{nil}, the prompt is repeated for the same object. If |
| 2303 | @var{list}. If it returns @code{nil}, the prompt is repeated for the | 2320 | the user requests help, the text in @var{help} is used to describe |
| 2304 | same object. | 2321 | these additional answers. |
| 2305 | 2322 | ||
| 2306 | Normally, @code{map-y-or-n-p} binds @code{cursor-in-echo-area} while | 2323 | Normally, @code{map-y-or-n-p} binds @code{cursor-in-echo-area} while |
| 2307 | prompting. But if @var{no-cursor-in-echo-area} is non-@code{nil}, it | 2324 | prompting. But if @var{no-cursor-in-echo-area} is non-@code{nil}, it |
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 7464ba2eb1d..c89e0e75f85 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -2084,14 +2084,15 @@ This clause also accepts optional @samp{from @var{pos}} and | |||
| 2084 | @samp{to @var{pos}} terms, limiting the clause to overlays which | 2084 | @samp{to @var{pos}} terms, limiting the clause to overlays which |
| 2085 | overlap the specified region. | 2085 | overlap the specified region. |
| 2086 | 2086 | ||
| 2087 | @item for @var{var} being the intervals [of @var{buffer}] @dots{} | 2087 | @item for @var{var} being the intervals [of @var{object}] @dots{} |
| 2088 | This clause iterates over all intervals of a buffer with constant | 2088 | This clause iterates over all intervals of a buffer or string with |
| 2089 | text properties. The variable @var{var} will be bound to conses | 2089 | constant text properties. The variable @var{var} will be bound to |
| 2090 | of start and end positions, where one start position is always equal | 2090 | conses of start and end positions, where one start position is always |
| 2091 | to the previous end position. The clause allows @code{of}, | 2091 | equal to the previous end position. The clause allows @code{of}, |
| 2092 | @code{from}, @code{to}, and @code{property} terms, where the latter | 2092 | @code{from}, @code{to}, and @code{property} terms, where the latter |
| 2093 | term restricts the search to just the specified property. The | 2093 | term restricts the search to just the specified property. The |
| 2094 | @code{of} term may specify either a buffer or a string. | 2094 | @code{of} term may specify either a buffer or a string. @xref{Text |
| 2095 | Properties,,,elisp}. | ||
| 2095 | 2096 | ||
| 2096 | @item for @var{var} being the frames | 2097 | @item for @var{var} being the frames |
| 2097 | This clause iterates over all Emacs frames. The clause @code{screens} is | 2098 | This clause iterates over all Emacs frames. The clause @code{screens} is |
| @@ -2238,7 +2239,7 @@ were non-@code{nil}, the loop returns @code{t}: | |||
| 2238 | 2239 | ||
| 2239 | @item never @var{condition} | 2240 | @item never @var{condition} |
| 2240 | This clause is like @code{always}, except that the loop returns | 2241 | This clause is like @code{always}, except that the loop returns |
| 2241 | @code{t} if any conditions were false, or @code{nil} otherwise. | 2242 | @code{t} if all conditions were false, or @code{nil} otherwise. |
| 2242 | 2243 | ||
| 2243 | @item thereis @var{condition} | 2244 | @item thereis @var{condition} |
| 2244 | This clause stops the loop when the specified form is non-@code{nil}; | 2245 | This clause stops the loop when the specified form is non-@code{nil}; |
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 86a0c76fd16..0522b31f577 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el | |||
| @@ -38,46 +38,62 @@ | |||
| 38 | 38 | ||
| 39 | (defun map-y-or-n-p (prompter actor list &optional help action-alist | 39 | (defun map-y-or-n-p (prompter actor list &optional help action-alist |
| 40 | no-cursor-in-echo-area) | 40 | no-cursor-in-echo-area) |
| 41 | "Ask a series of boolean questions. | 41 | "Ask a boolean question per PROMPTER for each object in LIST, then call ACTOR. |
| 42 | Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST. | ||
| 43 | 42 | ||
| 44 | LIST is a list of objects, or a function of no arguments to return the next | 43 | LIST is a list of objects, or a function of no arguments to return the next |
| 45 | object or nil. | 44 | object; when it returns nil, the list of objects is considered exhausted. |
| 46 | 45 | ||
| 47 | If PROMPTER is a string, the prompt is \(format PROMPTER OBJECT). If not | 46 | If PROMPTER is a string, it should be a format string to be used to format |
| 48 | a string, PROMPTER is a function of one arg (an object from LIST), which | 47 | the question as \(format PROMPTER OBJECT). |
| 49 | returns a string to be used as the prompt for that object. If the return | 48 | If PROMPTER is not a string, it should be a function of one argument, an |
| 50 | value is not a string, it may be nil to ignore the object or non-nil to act | 49 | object from LIST, which returns a string to be used as the question for |
| 51 | on the object without asking the user. | 50 | that object. If the function's return value is not a string, it may be |
| 52 | 51 | nil to ignore the object, or non-nil to act on the object with ACTOR | |
| 53 | ACTOR is a function of one arg (an object from LIST), | 52 | without asking the user. |
| 54 | which gets called with each object that the user answers `yes' for. | 53 | |
| 55 | 54 | ACTOR is a function of one argument, an object from LIST, | |
| 56 | If HELP is given, it is a list (OBJECT OBJECTS ACTION), | 55 | which gets called with each object for which the user answers `yes' |
| 57 | where OBJECT is a string giving the singular noun for an elt of LIST; | 56 | to the question presented by PROMPTER. |
| 58 | OBJECTS is the plural noun for elts of LIST, and ACTION is a transitive | 57 | |
| 59 | verb describing ACTOR. The default is \(\"object\" \"objects\" \"act on\"). | 58 | The user's answers to the questions may be one of the following: |
| 60 | 59 | ||
| 61 | At the prompts, the user may enter y, Y, or SPC to act on that object; | 60 | - y, Y, or SPC to act on that object; |
| 62 | n, N, or DEL to skip that object; ! to act on all following objects; | 61 | - n, N, or DEL to skip that object; |
| 63 | ESC or q to exit (skip all following objects); . (period) to act on the | 62 | - ! to act on all following objects; |
| 64 | current object and then exit; or \\[help-command] to get help. | 63 | - ESC or q to exit (skip all following objects); |
| 65 | 64 | - . (period) to act on the current object and then exit; or | |
| 66 | If ACTION-ALIST is given, it is an alist (KEY FUNCTION HELP) of extra keys | 65 | - \\[help-command] to get help. |
| 67 | that will be accepted. KEY is a character; FUNCTION is a function of one | 66 | |
| 68 | arg (an object from LIST); HELP is a string. When the user hits KEY, | 67 | HELP provides information for displaying help when the user |
| 69 | FUNCTION is called. If it returns non-nil, the object is considered | 68 | types \\[help-command]. If HELP is given, it should be a list of |
| 70 | \"acted upon\", and the next object from LIST is processed. If it returns | 69 | the form (OBJECT OBJECTS ACTION), where OBJECT is a string giving |
| 71 | nil, the prompt is repeated for the same object. | 70 | the singular noun describing an element of LIST; OBJECTS is the |
| 72 | 71 | plural noun describing several elements of LIST, and ACTION is a | |
| 73 | Final optional argument NO-CURSOR-IN-ECHO-AREA non-nil says not to set | 72 | transitive verb describing action by ACTOR on one or more elements |
| 74 | `cursor-in-echo-area' while prompting. | 73 | of LIST. If HELP is omitted or nil, it defaults |
| 74 | to \(\"object\" \"objects\" \"act on\"). | ||
| 75 | |||
| 76 | If ACTION-ALIST is given, it is an alist specifying additional keys | ||
| 77 | that will be accepted as an answer to the questions. Each element | ||
| 78 | of the alist has the form (KEY FUNCTION HELP), where KEY is a character; | ||
| 79 | FUNCTION is a function of one argument (an object from LIST); and HELP | ||
| 80 | is a string. When the user presses KEY, FUNCTION is called; if it | ||
| 81 | returns non-nil, the object is considered to have been \"acted upon\", | ||
| 82 | and `map-y-or-n-p' proceeeds to the next object from LIST. If | ||
| 83 | FUNCTION returns nil, the prompt is re-issued for the same object: this | ||
| 84 | comes in handy if FUNCTION produces some display that will allow the | ||
| 85 | user to make an intelligent decision whether the object in question | ||
| 86 | should be acted upon. If the user types \\[help-command], the string | ||
| 87 | given by HELP is used to describe the effect of KEY. | ||
| 88 | |||
| 89 | Optional argument NO-CURSOR-IN-ECHO-AREA, if non-nil, means not to set | ||
| 90 | `cursor-in-echo-area' while prompting with the questions. | ||
| 75 | 91 | ||
| 76 | This function uses `query-replace-map' to define the standard responses, | 92 | This function uses `query-replace-map' to define the standard responses, |
| 77 | but not all of the responses which `query-replace' understands | 93 | but only some of the responses which `query-replace' understands |
| 78 | are meaningful here. | 94 | are meaningful here, as described above. |
| 79 | 95 | ||
| 80 | Returns the number of actions taken." | 96 | The function's value is the number of actions taken." |
| 81 | (let* ((actions 0) | 97 | (let* ((actions 0) |
| 82 | (msg (current-message)) | 98 | (msg (current-message)) |
| 83 | user-keys mouse-event map prompt char elt def | 99 | user-keys mouse-event map prompt char elt def |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 61514d6761b..3914bdeb83e 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -49,10 +49,12 @@ A value of nil means that any change in indentation starts a new paragraph." | |||
| 49 | 49 | ||
| 50 | (defcustom fill-separate-heterogeneous-words-with-space nil | 50 | (defcustom fill-separate-heterogeneous-words-with-space nil |
| 51 | "Non-nil means to use a space to separate words of a different kind. | 51 | "Non-nil means to use a space to separate words of a different kind. |
| 52 | This will be done with a word in the end of a line and a word in | 52 | For example, when an English word at the end of a line and a CJK word |
| 53 | the beginning of the next line when concatenating them for | 53 | at the beginning of the next line are joined into a single line, they |
| 54 | filling those lines. Whether to use a space depends on how the | 54 | will be separated by a space if this variable is non-nil. |
| 55 | words are categorized." | 55 | Whether to use a space to separate such words also depends on the entry |
| 56 | in `fill-nospace-between-words-table' for the characters before and | ||
| 57 | after the newline." | ||
| 56 | :type 'boolean | 58 | :type 'boolean |
| 57 | :version "26.1") | 59 | :version "26.1") |
| 58 | 60 | ||