Closed monnier closed 4 months ago
Thanks for sending this, Stefan. (I'm not a maintainer here, but I reported a nasty bug whose fix is relevant here, IIRC.)
You mention this patch on the mailing list here: https://lists.gnu.org/archive/html/emacs-devel/2024-01/msg01178.html IIUC that means that this patch to Buttercup is going to be necessary on Emacs 30+, right?
You mention this patch on the mailing list here: https://lists.gnu.org/archive/html/emacs-devel/2024-01/msg01178.html IIUC that means that this patch to Buttercup is going to be necessary on Emacs 30+, right?
That's possible (it depends on how that discussion goes, and also on whether I finish and cleanup the PoC patch I sent). Also "this patch ... necessary" is not quite correct: some patch would be necessary, but the one I sent is not the only one that would work.
IOW, the motivation for my patch to Buttercup is to make the code cleaner and more robust (including against changes like the one being discussed over at emacs-devel).
I was idly browsing the
buttercup.el
code when I bumped into thebuttercup--enclosed-expr
horror. I don't mean it as a criticism (I've written my share of such hacks in the past), but to point out that it's exactly these kinds of needs which motivated me to develop OClosures.OClosures are new in Emacs-29, so we can't just replace that code willy-nilly, but the patch below makes
buttercup.el
use OClosures when available to avoid looking inside functions (and as a bonus it makes it work with bytecompiled functions as well).