Function: ibtype:create

ibtype:create is a function alias for defib, defined in hbut.el.

Signature

(ibtype:create TYPE PARAMS DOC AT-P &optional TO-P STYLE)

Documentation

Create Hyperbole implicit button TYPE with PARAMS, described by DOC.

TYPE is an unquoted symbol. PARAMS are presently ignored.

AT-P is a boolean form of no arguments which determines whether or not point is within a button of this type. When non-nil, it must contain a call to ibut:label-set with the text and optional buffer region of the button's label. This almost always should be followed by a call to hact with an action to be performed whenever a button of this type is activated.

The action may be a regular Emacs Lisp function or a Hyperbole action type created with defact but may not return nil since any nil value returned is converted to t to ensure the implicit button checker recognizes that the action has been executed.

Optional TO-P is a boolean form which moves point immediately after the next button of this type within the current buffer and returns a list of (button- label start-pos end-pos), or nil when none is found.

Optional STYLE is a display style specification to use when highlighting buttons of this type; most useful when TO-P is also given.

Return symbol created when successful, else nil. Nil indicates that action type for ibtype is presently undefined.

Aliases

ibtype:create