Function: htype:create
htype:create is a macro defined in hact.el.
Signature
(htype:create TYPE TYPE-CATEGORY DOC PARAMS BODY PROPERTY-LIST)
Documentation
Create a new Hyperbole TYPE within TYPE-CATEGORY (both unquoted symbols).
Third arg DOC is a string describing the type. Fourth arg PARAMS is a list of parameters to send to the fifth arg BODY, which is a list of forms executed when the type is evaluated. Sixth arg PROPERTY-LIST is attached to the new type's symbol.
Return the new function symbol derived from TYPE.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hact.el
;; Thanks to JWZ for help on this.
(defmacro htype:create (type type-category doc params body property-list)
"Create a new Hyperbole TYPE within TYPE-CATEGORY (both unquoted symbols).
Third arg DOC is a string describing the type.
Fourth arg PARAMS is a list of parameters to send to the fifth arg BODY,
which is a list of forms executed when the type is evaluated.
Sixth arg PROPERTY-LIST is attached to the new type's symbol.
Return the new function symbol derived from TYPE."
(when (null type)
(error "(htype:create): `type' must not be null"))
(let* ((sym (htype:symbol type type-category))
(action (nconc (list 'defun sym params doc) body)))
`(progn
,action
(setplist ',sym '(definition-name ,type ,@property-list))
(symset:add ',type ',type-category 'symbols)
(run-hooks 'htype-create-hook)
',sym)))