diff options
| author | Glenn Morris | 2018-10-31 07:50:57 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-10-31 07:50:57 -0700 |
| commit | 3a739236d061cf44dcba77f163e6087be4fd09fa (patch) | |
| tree | 37ba2826d46d4157de3b6b7cd2c03264e3467641 /doc | |
| parent | 5fec8294a7eb50a4ada26519cd578006b8d16b35 (diff) | |
| parent | eb903d8f20ab0c31daa27a08b0acfd30115c7b5e (diff) | |
| download | emacs-3a739236d061cf44dcba77f163e6087be4fd09fa.tar.gz emacs-3a739236d061cf44dcba77f163e6087be4fd09fa.zip | |
Merge from origin/emacs-26
eb903d8 * lisp/emacs-lisp/pcase.el: Improve docstrings.
86abbb3 * lisp/emacs-lisp/rx.el (rx): Fix typo in doc string. (Bug#3...
ced58d3 Improve doc string of 'call-process'
38f88a7 Document that generic functions cannot be commands
5aeddfa * lisp/mail/rmailsum.el (rmail-summary-output): Add lost word...
10e0fd8 Add index entries for more isearch commands/bindings (Bug#32990)
de28184 * lisp/simple.el (filter-buffer-substring): Clarify doc (Bug#...
d192c16 Fix recent change in lispref/processes.texi.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/search.texi | 117 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 14 |
4 files changed, 91 insertions, 50 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index c9f3ccc5481..801e8bb33eb 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -114,24 +114,30 @@ Isearch}, for more about dealing with unsuccessful search. | |||
| 114 | 114 | ||
| 115 | @cindex exit incremental search | 115 | @cindex exit incremental search |
| 116 | @cindex incremental search, exiting | 116 | @cindex incremental search, exiting |
| 117 | @findex isearch-exit | ||
| 118 | @kindex RET @r{(Incremental search)} | ||
| 117 | When you are satisfied with the place you have reached, type | 119 | When you are satisfied with the place you have reached, type |
| 118 | @key{RET}. This stops searching, leaving the cursor where the search | 120 | @key{RET} (@code{isearch-exit}). This stops searching, leaving the |
| 119 | brought it. Also, any command not specially meaningful in searches | 121 | cursor where the search brought it. Also, any command not specially |
| 120 | stops the searching and is then executed. Thus, typing @kbd{C-a} | 122 | meaningful in searches stops the searching and is then executed. |
| 121 | exits the search and then moves to the beginning of the line; typing | 123 | Thus, typing @kbd{C-a} exits the search and then moves to the |
| 122 | one of the arrow keys exits the search and performs the respective | 124 | beginning of the line; typing one of the arrow keys exits the search |
| 123 | movement command; etc. @key{RET} is necessary only if the next | 125 | and performs the respective movement command; etc. @key{RET} is |
| 124 | command you want to type is a printing character, @key{DEL}, | 126 | necessary only if the next command you want to type is a printing |
| 125 | @key{RET}, or another character that is special within searches | 127 | character, @key{DEL}, @key{RET}, or another character that is special |
| 126 | (@kbd{C-q}, @kbd{C-w}, @kbd{C-r}, @kbd{C-s}, @kbd{C-y}, @kbd{M-y}, | 128 | within searches (@kbd{C-q}, @kbd{C-w}, @kbd{C-r}, @kbd{C-s}, |
| 127 | @kbd{M-r}, @kbd{M-c}, @kbd{M-e}, and some others described below). | 129 | @kbd{C-y}, @kbd{M-y}, @kbd{M-r}, @kbd{M-c}, @kbd{M-e}, and some others |
| 128 | You can fine-tune the commands that exit the search; see @ref{Not | 130 | described below). You can fine-tune the commands that exit the |
| 129 | Exiting Isearch}. | 131 | search; see @ref{Not Exiting Isearch}. |
| 130 | 132 | ||
| 131 | As a special exception, entering @key{RET} when the search string is | 133 | As a special exception, entering @key{RET} when the search string is |
| 132 | empty launches nonincremental search (@pxref{Nonincremental Search}). | 134 | empty launches nonincremental search (@pxref{Nonincremental Search}). |
| 133 | (This can be customized; see @ref{Search Customizations}.) | 135 | (This can be customized; see @ref{Search Customizations}.) |
| 134 | 136 | ||
| 137 | @findex isearch-abort | ||
| 138 | @findex isearch-cancel | ||
| 139 | @kindex C-g C-g @r{(Incremental Search)} | ||
| 140 | @kindex ESC ESC ESC @r{(Incremental Search)} | ||
| 135 | To abandon the search and return to the place where you started, | 141 | To abandon the search and return to the place where you started, |
| 136 | type @kbd{@key{ESC} @key{ESC} @key{ESC}} (@code{isearch-cancel}) or | 142 | type @kbd{@key{ESC} @key{ESC} @key{ESC}} (@code{isearch-cancel}) or |
| 137 | @kbd{C-g C-g} (@code{isearch-abort}). | 143 | @kbd{C-g C-g} (@code{isearch-abort}). |
| @@ -154,13 +160,18 @@ matches that begin after it. | |||
| 154 | @node Repeat Isearch | 160 | @node Repeat Isearch |
| 155 | @subsection Repeating Incremental Search | 161 | @subsection Repeating Incremental Search |
| 156 | 162 | ||
| 163 | @kindex C-s @r{(Incremental Search)} | ||
| 164 | @kindex C-r @r{(Incremental Search)} | ||
| 165 | @findex isearch-repeat-forward | ||
| 166 | @findex isearch-repeat-backward | ||
| 157 | Suppose you search forward for @samp{FOO} and find a match, but not | 167 | Suppose you search forward for @samp{FOO} and find a match, but not |
| 158 | the one you expected to find: the @samp{FOO} you were aiming for | 168 | the one you expected to find: the @samp{FOO} you were aiming for |
| 159 | occurs later in the buffer. In this event, type another @kbd{C-s} to | 169 | occurs later in the buffer. In this event, type another @kbd{C-s} |
| 160 | move to the next occurrence of the search string. You can repeat this | 170 | (@code{isearch-repeat-forward}) to move to the next occurrence of the |
| 161 | any number of times. If you overshoot, you can cancel some @kbd{C-s} | 171 | search string. You can repeat this any number of times. If you |
| 162 | characters with @key{DEL}. Similarly, each @kbd{C-r} in a backward | 172 | overshoot, you can cancel some @kbd{C-s} commands with @key{DEL}. |
| 163 | incremental search repeats the backward search. | 173 | Similarly, each @kbd{C-r} (@code{isearch-repeat-backward}) in a |
| 174 | backward incremental search repeats the backward search. | ||
| 164 | 175 | ||
| 165 | @cindex lazy search highlighting | 176 | @cindex lazy search highlighting |
| 166 | If you pause for a little while during incremental search, Emacs | 177 | If you pause for a little while during incremental search, Emacs |
| @@ -200,12 +211,15 @@ going past the original starting point of the search, it changes to | |||
| 200 | you have already seen. | 211 | you have already seen. |
| 201 | 212 | ||
| 202 | @cindex search ring | 213 | @cindex search ring |
| 214 | @findex isearch-ring-advance | ||
| 215 | @findex isearch-ring-retreat | ||
| 203 | @kindex M-n @r{(Incremental search)} | 216 | @kindex M-n @r{(Incremental search)} |
| 204 | @kindex M-p @r{(Incremental search)} | 217 | @kindex M-p @r{(Incremental search)} |
| 205 | @vindex search-ring-max | 218 | @vindex search-ring-max |
| 206 | To reuse earlier search strings, use the @dfn{search ring}. The | 219 | To reuse earlier search strings, use the @dfn{search ring}. The |
| 207 | commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a | 220 | commands @kbd{M-p} (@code{isearch-ring-retreat}) and @kbd{M-n} |
| 208 | search string to reuse. These commands leave the selected search ring | 221 | (@code{isearch-ring-advance}) move through the ring to pick a search |
| 222 | string to reuse. These commands leave the selected search ring | ||
| 209 | element in the minibuffer, where you can edit it. Type | 223 | element in the minibuffer, where you can edit it. Type |
| 210 | @kbd{C-s}/@kbd{C-r} or @key{RET} to accept the string and start | 224 | @kbd{C-s}/@kbd{C-r} or @key{RET} to accept the string and start |
| 211 | searching for it. The number of most recently used search strings | 225 | searching for it. The number of most recently used search strings |
| @@ -214,14 +228,16 @@ saved in the search ring is specified by the variable | |||
| 214 | 228 | ||
| 215 | @cindex incremental search, edit search string | 229 | @cindex incremental search, edit search string |
| 216 | @cindex interactively edit search string | 230 | @cindex interactively edit search string |
| 231 | @findex isearch-edit-string | ||
| 217 | @kindex M-e @r{(Incremental search)} | 232 | @kindex M-e @r{(Incremental search)} |
| 218 | @kindex mouse-1 @r{in the minibuffer (Incremental Search)} | 233 | @kindex mouse-1 @r{in the minibuffer (Incremental Search)} |
| 219 | To edit the current search string in the minibuffer without | 234 | To edit the current search string in the minibuffer without |
| 220 | replacing it with items from the search ring, type @kbd{M-e} or click | 235 | replacing it with items from the search ring, type @kbd{M-e} |
| 221 | @kbd{mouse-1} in the minibuffer. Type @key{RET}, @kbd{C-s} or | 236 | (@code{isearch-edit-string}) or click @kbd{mouse-1} in the minibuffer. |
| 222 | @kbd{C-r} to finish editing the string and search for it. Type | 237 | Type @key{RET}, @kbd{C-s} or @kbd{C-r} to finish editing the string |
| 223 | @kbd{C-f} or @kbd{@key{RIGHT}} to add to the search string characters | 238 | and search for it. Type @kbd{C-f} or @kbd{@key{RIGHT}} to add to the |
| 224 | following point from the buffer from which you started the search. | 239 | search string characters following point from the buffer from which |
| 240 | you started the search. | ||
| 225 | 241 | ||
| 226 | @node Isearch Yank | 242 | @node Isearch Yank |
| 227 | @subsection Isearch Yanking | 243 | @subsection Isearch Yanking |
| @@ -364,17 +380,22 @@ following methods: | |||
| 364 | 380 | ||
| 365 | @itemize @bullet | 381 | @itemize @bullet |
| 366 | @item | 382 | @item |
| 367 | Type @kbd{C-q}, followed by a non-graphic character or a sequence of | 383 | @findex isearch-quote-char |
| 368 | octal digits. This adds a character to the search string, similar to | 384 | @kindex C-q @r{(Incremental Search)} |
| 369 | inserting into a buffer using @kbd{C-q} (@pxref{Inserting Text}). For | 385 | Type @kbd{C-q} (@code{isearch-quote-char}), followed by a non-graphic |
| 370 | example, @kbd{C-q C-s} during incremental search adds the | 386 | character or a sequence of octal digits. This adds a character to the |
| 371 | @samp{control-S} character to the search string. | 387 | search string, similar to inserting into a buffer using @kbd{C-q} |
| 388 | (@pxref{Inserting Text}). For example, @kbd{C-q C-s} during | ||
| 389 | incremental search adds the @samp{control-S} character to the search | ||
| 390 | string. | ||
| 372 | 391 | ||
| 373 | @item | 392 | @item |
| 374 | Type @kbd{C-x 8 @key{RET}}, followed by a Unicode name or code-point | 393 | @findex isearch-char-by-name |
| 375 | in hex. This adds the specified character into the search string, | 394 | @kindex C-x 8 RET @r{(Incremental Search)} |
| 376 | similar to the usual @code{insert-char} command (@pxref{Inserting | 395 | Type @kbd{C-x 8 @key{RET}} (@code{isearch-char-by-name}), followed by |
| 377 | Text}). | 396 | a Unicode name or code-point in hex. This adds the specified |
| 397 | character into the search string, similar to the usual | ||
| 398 | @code{insert-char} command (@pxref{Inserting Text}). | ||
| 378 | 399 | ||
| 379 | @item | 400 | @item |
| 380 | @kindex C-^ @r{(Incremental Search)} | 401 | @kindex C-^ @r{(Incremental Search)} |
| @@ -407,12 +428,20 @@ current buffer afterwards. | |||
| 407 | @code{isearch-occur}, which runs @code{occur} with the current search | 428 | @code{isearch-occur}, which runs @code{occur} with the current search |
| 408 | string. @xref{Other Repeating Search, occur}. | 429 | string. @xref{Other Repeating Search, occur}. |
| 409 | 430 | ||
| 431 | @findex isearch-query-replace | ||
| 432 | @findex isearch-query-replace-regexp | ||
| 410 | @kindex M-% @r{(Incremental search)} | 433 | @kindex M-% @r{(Incremental search)} |
| 411 | Typing @kbd{M-%} in incremental search invokes @code{query-replace} | 434 | @kindex C-M-% @r{(Incremental search)} |
| 412 | or @code{query-replace-regexp} (depending on search mode) with the | 435 | Typing @kbd{M-%} (@code{isearch-query-replace}) in incremental |
| 413 | current search string used as the string to replace. A negative | 436 | search invokes @code{query-replace} or @code{query-replace-regexp} |
| 414 | prefix argument means to replace backward. @xref{Query Replace}. | 437 | (depending on search mode) with the current search string used as the |
| 415 | 438 | string to replace. A negative prefix argument means to replace | |
| 439 | backward. @xref{Query Replace}. Typing @kbd{C-M-%} | ||
| 440 | (@code{isearch-query-replace-regexp}) invokes | ||
| 441 | @code{query-replace-regexp} with the current search string used as the | ||
| 442 | regexp to replace. | ||
| 443 | |||
| 444 | @findex isearch-complete | ||
| 416 | @kindex M-TAB @r{(Incremental search)} | 445 | @kindex M-TAB @r{(Incremental search)} |
| 417 | Typing @kbd{M-@key{TAB}} in incremental search invokes | 446 | Typing @kbd{M-@key{TAB}} in incremental search invokes |
| 418 | @code{isearch-complete}, which attempts to complete the search string | 447 | @code{isearch-complete}, which attempts to complete the search string |
| @@ -618,15 +647,17 @@ Search backward for @var{words}, using a nonincremental word search. | |||
| 618 | Search the Web for the text in region. | 647 | Search the Web for the text in region. |
| 619 | @end table | 648 | @end table |
| 620 | 649 | ||
| 621 | @kindex M-s w | ||
| 622 | @findex isearch-forward-word | 650 | @findex isearch-forward-word |
| 651 | @findex isearch-toggle-word | ||
| 652 | @kindex M-s w | ||
| 623 | To begin a forward incremental word search, type @kbd{M-s w}. If | 653 | To begin a forward incremental word search, type @kbd{M-s w}. If |
| 624 | incremental search is not already active, this runs the command | 654 | incremental search is not already active, this runs the command |
| 625 | @code{isearch-forward-word}. If incremental search is already active | 655 | @code{isearch-forward-word}. If incremental search is already active |
| 626 | (whether a forward or backward search), @kbd{M-s w} switches to a word | 656 | (whether a forward or backward search), @kbd{M-s w} runs the command |
| 627 | search while keeping the direction of the search and the current | 657 | @code{isearch-toggle-word}, which switches to a word search while |
| 628 | search string unchanged. You can toggle word search back off by | 658 | keeping the direction of the search and the current search string |
| 629 | typing @kbd{M-s w} again. | 659 | unchanged. You can toggle word search back off by typing @kbd{M-s w} |
| 660 | again. | ||
| 630 | 661 | ||
| 631 | @findex word-search-forward | 662 | @findex word-search-forward |
| 632 | @findex word-search-backward | 663 | @findex word-search-backward |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 49c839a8971..427379bc79c 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -136,6 +136,9 @@ start with a capital, e.g., @code{"use (system-name) instead."}); @code{t}; any | |||
| 136 | other symbol, which should be an alternative function to use in Lisp | 136 | other symbol, which should be an alternative function to use in Lisp |
| 137 | code. | 137 | code. |
| 138 | 138 | ||
| 139 | Generic functions (@pxref{Generic Functions}) cannot be turned into | ||
| 140 | commands by adding the @code{interactive} form to them. | ||
| 141 | |||
| 139 | @menu | 142 | @menu |
| 140 | * Using Interactive:: General rules for @code{interactive}. | 143 | * Using Interactive:: General rules for @code{interactive}. |
| 141 | * Interactive Codes:: The standard letter-codes for reading arguments | 144 | * Interactive Codes:: The standard letter-codes for reading arguments |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 3be52d8e624..69e9919f708 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1350,6 +1350,13 @@ to invoke the other auxiliary or primary methods. | |||
| 1350 | This allows you to add more methods, distinguished by @var{string}, | 1350 | This allows you to add more methods, distinguished by @var{string}, |
| 1351 | for the same specializers and qualifiers. | 1351 | for the same specializers and qualifiers. |
| 1352 | @end table | 1352 | @end table |
| 1353 | |||
| 1354 | Functions defined using @code{cl-defmethod} cannot be made | ||
| 1355 | interactive, i.e.@: commands (@pxref{Defining Commands}), by adding | ||
| 1356 | the @code{interactive} form to them. If you need a polymorphic | ||
| 1357 | command, we recommend defining a normal command that calls a | ||
| 1358 | polymorphic function defined via @code{cl-defgeneric} and | ||
| 1359 | @code{cl-defmethod}. | ||
| 1353 | @end defmac | 1360 | @end defmac |
| 1354 | 1361 | ||
| 1355 | @cindex dispatch of methods for generic function | 1362 | @cindex dispatch of methods for generic function |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 2afc6a33828..d88c7fbe622 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -609,13 +609,13 @@ Shell mode, because they allow for job control (@kbd{C-c}, @kbd{C-z}, | |||
| 609 | etc.)@: between the process and its children, and because interactive | 609 | etc.)@: between the process and its children, and because interactive |
| 610 | programs treat ptys as terminal devices, whereas pipes don't support | 610 | programs treat ptys as terminal devices, whereas pipes don't support |
| 611 | these features. However, for subprocesses used by Lisp programs for | 611 | these features. However, for subprocesses used by Lisp programs for |
| 612 | internal purposes (i.e., with no user interaction), where significant | 612 | internal purposes (i.e., no user interaction with the subprocess is |
| 613 | amounts of data need to be exchanged between the subprocess and the | 613 | required), where significant amounts of data need to be exchanged |
| 614 | Lisp program, it is often better to use a pipe, because pipes are | 614 | between the subprocess and the Lisp program, it is often better to use |
| 615 | more efficient, and because they are immune to stray character | 615 | a pipe, because pipes are more efficient, and because they are immune |
| 616 | injections that ptys introduce for large (around 500 byte) messages. | 616 | to stray character injections that ptys introduce for large (around |
| 617 | Also, the total number of ptys is limited on many systems, and it is | 617 | 500 byte) messages. Also, the total number of ptys is limited on many |
| 618 | good not to waste them unnecessarily. | 618 | systems, and it is good not to waste them unnecessarily. |
| 619 | 619 | ||
| 620 | @defun make-process &rest args | 620 | @defun make-process &rest args |
| 621 | This function is the basic low-level primitive for starting | 621 | This function is the basic low-level primitive for starting |