From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 73175@debbugs.gnu.org, juri@linkov.net
Subject: bug#73175: 30.0.60; toggling emacs-news-view-mode doesn't remove buttons
Date: Tue, 24 Sep 2024 17:59:23 +0200 [thread overview]
Message-ID: <877cb1dov8.fsf@gmail.com> (raw)
In-Reply-To: <86frppdys5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Sep 2024 15:25:14 +0300")
>>>>> On Tue, 24 Sep 2024 15:25:14 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> Cc: 73175@debbugs.gnu.org
>> From: Robert Pluim <rpluim@gmail.com>
>> Date: Tue, 24 Sep 2024 11:29:45 +0200
>>
>> Hmm, `buttonize-region' isnʼt in the elisp manual. Iʼm assuming
>> emacs-30 is still open for documentation changes
Eli> Yes, thanks.
OK. Done.
Iʼve just remembered that button.el can use either overlays or text
properties to make buttons, so `unbuttonize-region' should look like
this:
(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)))
Robert
--
next prev parent reply other threads:[~2024-09-24 15:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 9:42 bug#73175: 30.0.60; toggling emacs-news-view-mode doesn't remove buttons Robert Pluim
2024-09-20 6:52 ` Juri Linkov
2024-09-20 8:57 ` Robert Pluim
2024-09-20 12:49 ` Robert Pluim
2024-09-24 6:39 ` Juri Linkov
2024-09-24 9:29 ` Robert Pluim
2024-09-24 12:25 ` Eli Zaretskii
2024-09-24 15:59 ` Robert Pluim [this message]
2024-10-11 10:18 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cb1dov8.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=73175@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.