Function: action:commandp
action:commandp is a byte-compiled function defined in hact.el.
Signature
(action:commandp FUNCTION)
Documentation
Return interactive calling form if FUNCTION has one, else nil.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hact.el
;;; ========================================================================
;;; action class
;;; ========================================================================
(defun action:commandp (function)
"Return interactive calling form if FUNCTION has one, else nil."
(let ((action
(cond ((null function) nil)
((symbolp function)
(and (fboundp function)
(hypb:indirect-function function)))
((and (listp function)
(eq (car function) 'autoload))
(error "(action:commandp): Autoload not supported: %s" function))
(t function))))
(cond (action
(interactive-form action))
((byte-code-function-p action)
(when (commandp action)
(list 'interactive (aref action 5))))
(t (commandp action)))))