[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#76313: New function `replace-region`
From: |
Stefan Monnier |
Subject: |
bug#76313: New function `replace-region` |
Date: |
Tue, 18 Feb 2025 12:01:38 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> `replace-region-contents` is a bad API
> Why is it bad?
- REPLACE-FN is never useful, it's always just as easy (and marginally
more efficient) to compute the replacement beforehand.
- It defaults to being expensive, whereas most potential users of
`replace-region` currently use insert+delete-region and thus would
need to pass an extra "cheaply" argument for fear of being impacted by
a slowdown.
- MAX-COSTS is ill-defined.
Also, personally I must say that I'd be happier calling `replace-region`
than `replace-region-contents`, just because it's shorter.
Given that `replace-region-contents` is fairly new and very little used,
I don't see much gain in trying to fit within its API.
Stefan
- bug#76313: New function `replace-region`, (continued)
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/16
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/17
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/17
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/17
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/17
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/17
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/18
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/18
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/18
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/18
- bug#76313: New function `replace-region`,
Stefan Monnier <=
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/18
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/18
- bug#76313: New function `replace-region`, Eli Zaretskii, 2025/02/19
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/19
- bug#76313: New function `replace-region`, Stefan Kangas, 2025/02/19
- bug#76313: New function `replace-region`, Tassilo Horn, 2025/02/20
- bug#76313: New function `replace-region`, Stefan Kangas, 2025/02/20
- bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/21
bug#76313: New function `replace-region`, Stefan Monnier, 2025/02/16