File: button.el.html

This package defines functions for inserting and manipulating clickable buttons in Emacs buffers, such as might be used for help hyperlinks, etc.

In some ways it duplicates functionality also offered by the widget package, but the button package has the advantage that it is (1) much faster, (2) much smaller, and (3) much, much, simpler
(the code, that is, not the interface).

Buttons can either use overlays, in which case the button is represented by the overlay itself, or text-properties, in which case the button is represented by a marker or buffer-position pointing somewhere in the button. In the latter case, no markers into the buffer are retained, which is important for speed if there are extremely large numbers of buttons. Note however that if there is an existing face text-property at the site of the button, the button face may not be visible. Using overlays avoids this.

Using define-button-type to define default properties for buttons is not necessary, but it is encouraged, since doing so makes the resulting code clearer and more efficient.

Defined variables (4)

button-buffer-mapKeymap useful for buffers containing buttons.
button-mapKeymap used by buttons.
button-modeNon-nil if Button mode is enabled.
button-mode-hookHook run after entering or leaving ‘button-mode’.

Defined functions (34)

backward-button(N &optional WRAP DISPLAY-MESSAGE NO-ERROR)
button--area-button-p(B)
button--area-button-string(ARG1)
button--describe(PROPERTIES)
button--help-echo(BUTTON)
button--properties(CALLBACK DATA HELP-ECHO)
button-activate(BUTTON &optional USE-MOUSE-ACTION)
button-at(POS)
button-buttonize(STRING CALLBACK &optional DATA HELP-ECHO)
button-category-symbol(TYPE)
button-describe(&optional BUTTON-OR-POS)
button-end(BUTTON)
button-get(BUTTON PROP)
button-has-type-p(BUTTON TYPE)
button-label(BUTTON)
button-mode(&optional ARG)
button-put(BUTTON PROP VAL)
button-start(BUTTON)
button-type(BUTTON)
button-type-get(TYPE PROP)
button-type-put(TYPE PROP VAL)
button-type-subtype-p(TYPE SUPERTYPE)
buttonize(STRING CALLBACK &optional DATA HELP-ECHO)
buttonize-region(START END CALLBACK &optional DATA HELP-ECHO)
define-button-type(NAME &rest PROPERTIES)
forward-button(N &optional WRAP DISPLAY-MESSAGE NO-ERROR)
insert-button(LABEL &rest PROPERTIES)
insert-text-button(LABEL &rest PROPERTIES)
make-button(BEG END &rest PROPERTIES)
make-text-button(BEG END &rest PROPERTIES)
next-button(POS &optional COUNT-CURRENT)
previous-button(POS &optional COUNT-CURRENT)
push-button(&optional POS USE-MOUSE-ACTION)
unbuttonize-region(START END)

Defined faces (1)

buttonDefault face used for buttons.