Function: defact

defact is a macro defined in hact.el.

Signature

(defact TYPE PARAMS DOC &rest DEFAULT-ACTION)

Documentation

Create Hyperbole action TYPE (unquoted symbol) with PARAMS, described by DOC.

The type uses PARAMS to perform DEFAULT-ACTION (list of the rest of the arguments). A call to this function is syntactically the same as for defun, but a doc string is required. Return symbol created when successful, else nil.

Aliases

actype:create

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hact.el
(defmacro defact (type params doc &rest default-action)
  "Create Hyperbole action TYPE (unquoted symbol) with PARAMS, described by DOC.
The type uses PARAMS to perform DEFAULT-ACTION (list of the rest of the
arguments).  A call to this function is syntactically the same as for
`defun', but a doc string is required.
Return symbol created when successful, else nil."
  (declare (indent defun)
           (doc-string 3)
           (debug (&define name lambda-list
                           [&optional stringp] ; Doc string, if present.
                           def-body)))
  `(progn
     (symtable:add ',type symtable:actypes)
     (htype:create ,type actypes ,doc ,params ,default-action nil)))