Subject: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method

From: Stefan Monnier <[email-masked]>
Date: Tue, 30 Oct 2018 08:48:49 -0400

>> Thanks for the response. Seems like the two-function solution is the way
>> to go I guess. I do think this should be documented as a limitation
>> somewhere though.
> Done.

Should we add a warning for it?

        Stefan

diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index fb4f3ab680..025653de70 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -355,6 +355,9 @@ cl-generic-define-context-rewriter
                                    . ,(lambda () spec-args))
                                  macroexpand-all-environment)))
       (require 'cl-lib)        ;Needed to expand `cl-flet' and `cl-function'.
+      (when (interactive-form (cadr fun))
+        (message "Interactive forms unsupported in generic functions: %S"
+                 (interactive-form (cadr fun))))
       ;; First macroexpand away the cl-function stuff (e.g. &key and
       ;; destructuring args, `declare' and whatnot).
       (pcase (macroexpand fun macroenv)