diff options
| author | Stefan Monnier | 2018-10-31 10:16:02 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2018-10-31 10:16:02 -0400 |
| commit | 5fec8294a7eb50a4ada26519cd578006b8d16b35 (patch) | |
| tree | 977f8c89ee74857aa8538a1d933b7335d59a4f14 | |
| parent | cf486a7a920d3d95fa9aa98d7b03ebc61b17518a (diff) | |
| download | emacs-5fec8294a7eb50a4ada26519cd578006b8d16b35.tar.gz 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.
| -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." | |||
| 345 | . ,(lambda () spec-args)) | 345 | . ,(lambda () spec-args)) |
| 346 | macroexpand-all-environment))) | 346 | macroexpand-all-environment))) |
| 347 | (require 'cl-lib) ;Needed to expand `cl-flet' and `cl-function'. | 347 | (require 'cl-lib) ;Needed to expand `cl-flet' and `cl-function'. |
| 348 | (when (interactive-form (cadr fun)) | ||
| 349 | (message "Interactive forms unsupported in generic functions: %S" | ||
| 350 | (interactive-form (cadr fun)))) | ||
| 348 | ;; First macroexpand away the cl-function stuff (e.g. &key and | 351 | ;; First macroexpand away the cl-function stuff (e.g. &key and |
| 349 | ;; destructuring args, `declare' and whatnot). | 352 | ;; destructuring args, `declare' and whatnot). |
| 350 | (pcase (macroexpand fun macroenv) | 353 | (pcase (macroexpand fun macroenv) |