]> git.eshelyaron.com Git - emacs.git/commitdiff
Document that generic functions cannot be commands
authorEli Zaretskii <eliz@gnu.org>
Tue, 30 Oct 2018 10:14:19 +0000 (12:14 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 30 Oct 2018 10:14:19 +0000 (12:14 +0200)
* doc/lispref/commands.texi (Defining Commands):
* doc/lispref/functions.texi (Generic Functions): Document
that generic functions cannot be turned into commands.
(Bug#33170)

doc/lispref/commands.texi
doc/lispref/functions.texi

index 49c839a897146b54816419d5caddffef4a58527c..427379bc79c6f646a164e49e9805d57caa3d81ff 100644 (file)
@@ -136,6 +136,9 @@ start with a capital, e.g., @code{"use (system-name) instead."}); @code{t}; any
 other symbol, which should be an alternative function to use in Lisp
 code.
 
+Generic functions (@pxref{Generic Functions}) cannot be turned into
+commands by adding the @code{interactive} form to them.
+
 @menu
 * Using Interactive::     General rules for @code{interactive}.
 * Interactive Codes::     The standard letter-codes for reading arguments
index 9b8057080ea3d2ad6366b8ecfd9e082cbda9cdc7..242d754dea90bb8d5504aefab0c01cb3d627a2e2 100644 (file)
@@ -1345,6 +1345,13 @@ to invoke the other auxiliary or primary methods.
 This allows you to add more methods, distinguished by @var{string},
 for the same specializers and qualifiers.
 @end table
+
+Functions defined using @code{cl-defmethod} cannot be made
+interactive, i.e.@: commands (@pxref{Defining Commands}), by adding
+the @code{interactive} form to them.  If you need a polymorphic
+command, we recommend defining a normal command that calls a
+polymorphic function defined via @code{cl-defgeneric} and
+@code{cl-defmethod}.
 @end defmac
 
 @cindex dispatch of methods for generic function