Document that generic functions cannot be commands
* doc/lispref/commands.texi (Defining Commands): * doc/lispref/functions.texi (Generic Functions): Document that generic functions cannot be turned into commands. (Bug#33170)
This commit is contained in:
parent
5aeddfac2a
commit
38f88a7f00
2 changed files with 10 additions and 0 deletions
|
@ -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
|
other symbol, which should be an alternative function to use in Lisp
|
||||||
code.
|
code.
|
||||||
|
|
||||||
|
Generic functions (@pxref{Generic Functions}) cannot be turned into
|
||||||
|
commands by adding the @code{interactive} form to them.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Using Interactive:: General rules for @code{interactive}.
|
* Using Interactive:: General rules for @code{interactive}.
|
||||||
* Interactive Codes:: The standard letter-codes for reading arguments
|
* Interactive Codes:: The standard letter-codes for reading arguments
|
||||||
|
|
|
@ -1345,6 +1345,13 @@ to invoke the other auxiliary or primary methods.
|
||||||
This allows you to add more methods, distinguished by @var{string},
|
This allows you to add more methods, distinguished by @var{string},
|
||||||
for the same specializers and qualifiers.
|
for the same specializers and qualifiers.
|
||||||
@end table
|
@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
|
@end defmac
|
||||||
|
|
||||||
@cindex dispatch of methods for generic function
|
@cindex dispatch of methods for generic function
|
||||||
|
|
Loading…
Add table
Reference in a new issue