]> git.eshelyaron.com Git - emacs.git/commitdiff
eval-command-interactive-spec: Shorten code
authorSean Whitton <spwhitton@spwhitton.name>
Tue, 6 Jun 2023 11:15:25 +0000 (12:15 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 6 Jun 2023 11:15:30 +0000 (12:15 +0100)
* lisp/emacs-lisp/subr-x.el (eval-command-interactive-spec): Don't
reimplement checking for an 'interactive-form symbol property.
`interactive-form' already does this.  Thanks to Stefan Monnier.

lisp/emacs-lisp/subr-x.el

index a7d8f7855089907150fd588c1ab6b7b131e8b388..38f85c242c7045052d909930580cae6daa8cc33d 100644 (file)
@@ -507,9 +507,7 @@ Used by `emacs-authors-mode' and `emacs-news-mode'."
 (defun eval-command-interactive-spec (command)
   "Evaluate COMMAND's interactive form and return resultant list.
 If COMMAND has no interactive form, return nil."
-  (advice-eval-interactive-spec
-   (cadr (or (and (symbolp command) (get command 'interactive-form))
-             (interactive-form command)))))
+  (advice-eval-interactive-spec (cadr (interactive-form command))))
 
 (provide 'subr-x)