]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cl-generic.el: Clarify we can't define commands
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 31 Oct 2018 14:16:02 +0000 (10:16 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 31 Oct 2018 14:16:02 +0000 (10:16 -0400)
(cl--generic-lambda): Warn about the presence of interactive specs.

lisp/emacs-lisp/cl-generic.el

index 173173305b4a045aa59bc538f0fc8fa3f29f2682..c7f0c48f85cba8e66ebbe931539c4f65722a81dc 100644 (file)
@@ -345,6 +345,9 @@ the specializer used will be the one returned by BODY."
                                    . ,(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)