Function: hui:actype
hui:actype is a byte-compiled function defined in hui.el.
Signature
(hui:actype &optional DEFAULT-ACTYPE PROMPT)
Documentation
Using optional DEFAULT-ACTYPE, PROMPT for and return a valid button action type.
DEFAULT-ACTYPE may be any valid, interactive command symbol or name. Trigger an error if DEFAULT-ACTYPE is invalid.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui.el
(defun hui:actype (&optional default-actype prompt)
"Using optional DEFAULT-ACTYPE, PROMPT for and return a valid button action type.
DEFAULT-ACTYPE may be any valid, interactive command symbol or name.
Trigger an error if DEFAULT-ACTYPE is invalid."
(when (and default-actype (symbolp default-actype))
(setq default-actype (symbol-name default-actype)
default-actype (actype:def-symbol default-actype)
default-actype (when default-actype (symbol-name default-actype))))
(if (or (null default-actype)
(and (stringp default-actype)
(commandp (actype:elisp-symbol default-actype))))
(let ((actype-name
(hargs:read-match (or prompt "Button's action type: ")
(nconc
(mapcar (lambda (sym)
(list (symbol-name (actype:def-symbol sym))))
(seq-filter #'commandp (htype:category 'actypes)))
(mapcar #'list (all-completions "" obarray
(lambda (sym) (commandp sym t)))))
nil t default-actype 'actype)))
(or (actype:def-symbol actype-name) (intern-soft actype-name)))
(hypb:error "(actype): Default action type must be an interactive command, not: %s" default-actype)))