[Top][All Lists]

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

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

From: Stefan Monnier
Subject: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method
Date: Tue, 30 Oct 2018 08:48:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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?


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))
       (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)

reply via email to

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