'indirect-function' and 'indirect-variable' will never signal an error.
Their 'noerror' arguments have no effect and are therefore obsolete.
+---
+** New function 'eval-command-interactive-spec' in the subr-x library.
+This function evaluates a command's interactive form and returns the
+resultant list.
+
\f
* Changes in Emacs 30.1 on Non-Free Operating Systems
(buffer-string))
usage))))
+;; FIXME: How about renaming this to just `eval-interactive-spec'?
+;; It's not specific to the advice system.
(defun advice-eval-interactive-spec (spec)
"Evaluate the interactive spec SPEC."
(cond
(progn (forward-line -1) (point))
(point-max)))))
+(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)))))
+
(provide 'subr-x)
;;; subr-x.el ends here