define-alternatives can be used to define
generic commands. These are interactive functions whose
implementation can be selected from several alternatives, as a matter
of user preference.
Define the new command command, a symbol.
When a user runs M-x command <RET> for the first time, Emacs prompts for which real form of the command to use, and records the selection by way of a custom variable. Using a prefix argument repeats this process of choosing an alternative.
The variable command
-alternativesshould contain an alist with alternative implementations of command. Until this variable is set,
define-alternativeshas no effect.
If customizations is non-
nil, it should consist of alternating
:version) and values to add to the declaration of command