Function: buttonize-region

buttonize-region is a byte-compiled function defined in button.el.gz.

Signature

(buttonize-region START END CALLBACK &optional DATA HELP-ECHO)

Documentation

Make the region between START and END into a button.

When clicked, CALLBACK will be called with the DATA as the function argument. If DATA isn't present (or is nil), the button itself will be used instead as the function argument.

If HELP-ECHO, use that as the help-echo property.

Also see buttonize and unbuttonize-region.

View in manual

Probably introduced at or before Emacs version 29.1.

Source Code

;; Defined in /usr/src/emacs/lisp/button.el.gz
(defun buttonize-region (start end callback &optional data help-echo)
  "Make the region between START and END into a button.
When clicked, CALLBACK will be called with the DATA as the
function argument.  If DATA isn't present (or is nil), the button
itself will be used instead as the function argument.

If HELP-ECHO, use that as the `help-echo' property.

Also see `buttonize' and `unbuttonize-region'."
  (add-text-properties start end (button--properties callback data help-echo))
  (add-face-text-property start end 'button t))