Subject: Re: bug#70784: Abolish string resizing

From: Mattias Engdegård <[email-masked]>
Date: Wed, 15 May 2024 19:30:43 +0200

To minimise even low-probability trouble, I've looked for standard Elisp functions that might run into the resizing mutation trouble if used in a specific way. There's not a lot, but so far I've done:

- cl-substitute[-if[-not]]
- cl-sort (not that sorting strings is very common)
- subst-char-in-string with INPLACE = nil

I'm going to leave functions that explicitly mutate strings alone since code may depend on them doing that which is completely fine.

The manual would benefit from some light editing, just to make it clear that mutating multibyte strings is not usually the best programming style. I'll post a suggested patch.

Also, I'm leaning toward removing `store-substring` from the manual because while it probably felt like a good addition at the time, circumstances have changed and it has hardly seen any use at all. (We can mark it obsolete or keep it indefinitely but it doesn't really deserve top billing these days.)