Function: unbuttonize-region
unbuttonize-region is a byte-compiled function defined in
button.el.gz.
Signature
(unbuttonize-region START END)
Documentation
Remove all the buttons between START and END.
This removes both text-property and overlay based buttons.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/button.el.gz
(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
(append
(button--properties nil nil nil)
;; Only remove help-echo if it was added by button.el.
(and (get-text-property start 'help-echo-button)
(list 'help-echo nil
'help-echo-button nil))))
(add-face-text-property start end
'button nil)))