emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 38f88a7: Document that generic functions cannot b


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 38f88a7: Document that generic functions cannot be commands
Date: Tue, 30 Oct 2018 06:14:55 -0400 (EDT)

branch: emacs-26
commit 38f88a7f00c654a1710b1156150e93e298a0e217
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 doc/lispref/commands.texi  | 3 +++
 doc/lispref/functions.texi | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 49c839a..427379b 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -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
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 9b80570..242d754 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -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
address@hidden
 @end defmac
 
 @cindex dispatch of methods for generic function



reply via email to

[Prev in Thread] Current Thread [Next in Thread]