From 96929e5d012583e1bcba3998076136701caf3165 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 24 Jan 2022 21:31:53 -0500 Subject: [PATCH] Remove some dubious uses of `interactive-form` * 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 | 4 +--- lisp/emacs-lisp/cl-generic.el | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 73ef37ea2aa..02ebde40785 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -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) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 53691881ec2..5e0e0834fff 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -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) -- 2.39.2