diff options
| author | Glenn Morris | 2014-10-03 23:59:30 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-10-03 23:59:30 -0700 |
| commit | 9352c1465fc4c32e04e763b4bf70e24292f06eed (patch) | |
| tree | 2f544aaa69391830095cde6a93ace3507498c23f | |
| parent | 93e408d7c55243176eab2b66cf4eaaf5847d685b (diff) | |
| download | emacs-9352c1465fc4c32e04e763b4bf70e24292f06eed.tar.gz emacs-9352c1465fc4c32e04e763b4bf70e24292f06eed.zip | |
* doc/lispref/commands.texi (Generic Commands): Copyedits.
| -rw-r--r-- | doc/lispref/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 35 |
2 files changed, 17 insertions, 20 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5795a6ae030..babcc22959e 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2014-10-04 Glenn Morris <rgm@gnu.org> | 1 | 2014-10-04 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * commands.texi (Generic Commands): Copyedits. | ||
| 4 | |||
| 3 | * display.texi (Scroll Bars): | 5 | * display.texi (Scroll Bars): |
| 4 | * modes.texi (Header Lines): Copyedits. | 6 | * modes.texi (Header Lines): Copyedits. |
| 5 | 7 | ||
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index c478b7847d2..5e22941c037 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -586,31 +586,26 @@ Put them into three windows, selecting the last one." | |||
| 586 | @cindex alternatives, defining | 586 | @cindex alternatives, defining |
| 587 | 587 | ||
| 588 | The macro @code{define-alternatives} can be used to define | 588 | The macro @code{define-alternatives} can be used to define |
| 589 | @dfn{generic commands}. Generic commands are interactive functions | 589 | @dfn{generic commands}. These are interactive functions whose |
| 590 | whose implementation can be selected among several alternatives, as a | 590 | implementation can be selected from several alternatives, as a matter |
| 591 | matter of user preference. | 591 | of user preference. |
| 592 | 592 | ||
| 593 | @defmac define-alternatives command &rest customizations | 593 | @defmac define-alternatives command &rest customizations |
| 594 | Define the new command `COMMAND'. | 594 | Define the new command @var{command}, a symbol. |
| 595 | 595 | ||
| 596 | The argument `COMMAND' should be a symbol. | 596 | When a user runs @kbd{M-x @var{command} @key{RET}} for the first time, |
| 597 | Emacs prompts for which real form of the command to use, and records | ||
| 598 | the selection by way of a custom variable. Using a prefix argument | ||
| 599 | repeats this process of choosing an alternative. | ||
| 597 | 600 | ||
| 598 | When a user runs @kbd{M-x COMMAND @key{RET}} for the first time, Emacs | 601 | The variable @code{@var{command}-alternatives} should contain an alist |
| 599 | will prompt for which alternative to use and record the selected | 602 | with alternative implementations of @var{command}. |
| 600 | command as a custom variable. | 603 | Until this variable is set, @code{define-alternatives} has no effect. |
| 601 | 604 | ||
| 602 | Running @kbd{C-u M-x COMMAND @key{RET}} prompts again for an | 605 | If @var{customizations} is non-@code{nil}, it should consist of |
| 603 | alternative and overwrites the previous choice. | 606 | alternating @code{defcustom} keywords (typically @code{:group} and |
| 604 | 607 | @code{:version}) and values to add to the declaration of | |
| 605 | The variable @code{COMMAND-alternatives} contains an alist | 608 | @code{@var{command}-alternatives}. |
| 606 | (@pxref{Association Lists}) with alternative implementations of | ||
| 607 | `COMMAND'. @code{define-alternatives} does not have any effect until | ||
| 608 | this variable is set. | ||
| 609 | |||
| 610 | If @var{customizations} is non-@var{nil}, it should be composed of | ||
| 611 | alternating @code{defcustom} keywords and values to add to the | ||
| 612 | declaration of @code{COMMAND-alternatives} (typically :group and | ||
| 613 | :version). | ||
| 614 | @end defmac | 609 | @end defmac |
| 615 | 610 | ||
| 616 | @node Interactive Call | 611 | @node Interactive Call |