@code{help-echo} property of the button.
@end defun
+@defun unbuttonize-region start end
+This function removes all buttons between @var{start} and @var{end} in
+the current buffer (both overlay and text-property based ones).
+@end defun
+
@node Manipulating Buttons
@subsection Manipulating Buttons
@cindex manipulating buttons
accepting an icalendar event will prompt for a comment to add to the
response.
+** Button
+
++++
+*** New function 'unbuttonize-region'.
+It removes all the buttons in the specified region.
+
** Eshell
---
If HELP-ECHO, use that as the `help-echo' property.
-Also see `buttonize'."
+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))
+(defun unbuttonize-region (start end)
+ "Remove all the buttons between START and END.
+This removes both text-property and overlay based buttons."
+ (dolist (o (overlays-in start end))
+ (when (overlay-get o 'button)
+ (delete-overlay o)))
+ (with-silent-modifications
+ (remove-text-properties start end
+ (button--properties nil nil nil))
+ (add-face-text-property start end
+ 'button nil)))
+
(provide 'button)
;;; button.el ends here