aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-10-03 23:59:30 -0700
committerGlenn Morris2014-10-03 23:59:30 -0700
commit9352c1465fc4c32e04e763b4bf70e24292f06eed (patch)
tree2f544aaa69391830095cde6a93ace3507498c23f
parent93e408d7c55243176eab2b66cf4eaaf5847d685b (diff)
downloademacs-9352c1465fc4c32e04e763b4bf70e24292f06eed.tar.gz
emacs-9352c1465fc4c32e04e763b4bf70e24292f06eed.zip
* doc/lispref/commands.texi (Generic Commands): Copyedits.
-rw-r--r--doc/lispref/ChangeLog2
-rw-r--r--doc/lispref/commands.texi35
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 @@
12014-10-04 Glenn Morris <rgm@gnu.org> 12014-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
588The macro @code{define-alternatives} can be used to define 588The 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
590whose implementation can be selected among several alternatives, as a 590implementation can be selected from several alternatives, as a matter
591matter of user preference. 591of user preference.
592 592
593@defmac define-alternatives command &rest customizations 593@defmac define-alternatives command &rest customizations
594Define the new command `COMMAND'. 594Define the new command @var{command}, a symbol.
595 595
596The argument `COMMAND' should be a symbol. 596When a user runs @kbd{M-x @var{command} @key{RET}} for the first time,
597Emacs prompts for which real form of the command to use, and records
598the selection by way of a custom variable. Using a prefix argument
599repeats this process of choosing an alternative.
597 600
598When a user runs @kbd{M-x COMMAND @key{RET}} for the first time, Emacs 601The variable @code{@var{command}-alternatives} should contain an alist
599will prompt for which alternative to use and record the selected 602with alternative implementations of @var{command}.
600command as a custom variable. 603Until this variable is set, @code{define-alternatives} has no effect.
601 604
602Running @kbd{C-u M-x COMMAND @key{RET}} prompts again for an 605If @var{customizations} is non-@code{nil}, it should consist of
603alternative and overwrites the previous choice. 606alternating @code{defcustom} keywords (typically @code{:group} and
604 607@code{:version}) and values to add to the declaration of
605The 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
608this variable is set.
609
610If @var{customizations} is non-@var{nil}, it should be composed of
611alternating @code{defcustom} keywords and values to add to the
612declaration 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