From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/generic-commands.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 devdocs/elisp/generic-commands.html (limited to 'devdocs/elisp/generic-commands.html') diff --git a/devdocs/elisp/generic-commands.html b/devdocs/elisp/generic-commands.html new file mode 100644 index 00000000..dd265cf7 --- /dev/null +++ b/devdocs/elisp/generic-commands.html @@ -0,0 +1,10 @@ +

Select among Command Alternatives

The macro 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.

Macro: define-alternatives command &rest customizations +
+

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-alternatives should contain an alist with alternative implementations of command. Until this variable is set, define-alternatives has no effect.

If customizations is non-nil, it should consist of alternating defcustom keywords (typically :group and :version) and values to add to the declaration of command-alternatives.

+
+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Generic-Commands.html +

+
-- cgit v1.2.3