From: Stefan Monnier Date: Tue, 25 Jan 2022 02:31:53 +0000 (-0500) Subject: Remove some dubious uses of `interactive-form` X-Git-Tag: emacs-29.0.90~2769 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96929e5d012583e1bcba3998076136701caf3165;p=emacs.git 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`. --- 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)