]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove some dubious uses of `interactive-form`
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 25 Jan 2022 02:31:53 +0000 (21:31 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 25 Jan 2022 02:31:53 +0000 (21:31 -0500)
* lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): `commandp` and
`interactive-form` are for function values, not for source code.
* lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag):
Prefer `commandp` over `interactive-form`.

lisp/cedet/semantic/db-el.el
lisp/emacs-lisp/cl-generic.el

index 73ef37ea2aaee5d9bb63aa38de977e9cf15e03d3..02ebde40785670782d6505b6239e62934aef4645 100644 (file)
@@ -213,9 +213,7 @@ TOKTYPE is a hint to the type of tag desired."
              (symbol-name sym)
              nil       ;; return type
              (semantic-elisp-desymbolify arglist)
-             :user-visible-flag (condition-case nil
-                                    (interactive-form sym)
-                                  (error nil)))))
+             :user-visible-flag (commandp sym))))
          ((and (eq toktype 'variable) (boundp sym))
           (semantic-tag-new-variable
            (symbol-name sym)
index 53691881ec2c285b5348cb1be9d3a38f05443cd0..5e0e0834fff2fbb03c474814af21a93db3479078 100644 (file)
@@ -381,9 +381,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))))
+      (when (assq 'interactive (cadr fun))
+        (message "Interactive forms not supported in generic functions: %S"
+                 (assq 'interactive (cadr fun))))
       ;; First macroexpand away the cl-function stuff (e.g. &key and
       ;; destructuring args, `declare' and whatnot).
       (pcase (macroexpand fun macroenv)