1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00

* lisp/emacs-lisp/cl-generic.el: Clarify we can't define commands

(cl--generic-lambda): Warn about the presence of interactive specs.
This commit is contained in:
Stefan Monnier 2018-10-31 10:16:02 -04:00
parent cf486a7a92
commit 5fec8294a7

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