diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2018-10-31 10:16:02 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2018-10-31 10:16:02 -0400 |
commit | 5fec8294a7eb50a4ada26519cd578006b8d16b35 (patch) | |
tree | 977f8c89ee74857aa8538a1d933b7335d59a4f14 /lisp/emacs-lisp | |
parent | cf486a7a920d3d95fa9aa98d7b03ebc61b17518a (diff) | |
download | emacs-5fec8294a7eb50a4ada26519cd578006b8d16b35.tar.gz emacs-5fec8294a7eb50a4ada26519cd578006b8d16b35.tar.bz2 emacs-5fec8294a7eb50a4ada26519cd578006b8d16b35.zip |
* lisp/emacs-lisp/cl-generic.el: Clarify we can't define commands
(cl--generic-lambda): Warn about the presence of interactive specs.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 173173305b4..c7f0c48f85c 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -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) |