emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5fec829: * lisp/emacs-lisp/cl-generic.el: Clarify w


From: Stefan Monnier
Subject: [Emacs-diffs] master 5fec829: * lisp/emacs-lisp/cl-generic.el: Clarify we can't define commands
Date: Wed, 31 Oct 2018 10:16:08 -0400 (EDT)

branch: master
commit 5fec8294a7eb50a4ada26519cd578006b8d16b35
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/emacs-lisp/cl-generic.el: Clarify we can't define commands
    
    (cl--generic-lambda): Warn about the presence of interactive specs.
---
 lisp/emacs-lisp/cl-generic.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 1731733..c7f0c48 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)



reply via email to

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