Function: buttonize
buttonize is a byte-compiled function defined in compat-29.el.
Signature
(buttonize STRING CALLBACK &optional DATA HELP-ECHO)
Documentation
[Compatibility function for buttonize, defined in Emacs 29.1. See (compat)
Emacs 29.1' for more details.]
Make STRING into a button and return it. 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-region.
Probably introduced at or before Emacs version 23.1.
Source Code
;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-29.el
(compat-defun buttonize (string callback &optional data help-echo) ;; <compat-tests:buttonize>
"Make STRING into a button and return it.
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-region'."
(let ((string
(apply #'propertize string
(button--properties callback data help-echo))))
;; Add the face to the end so that it can be overridden.
(add-face-text-property 0 (length string) 'button t string)
string))