Subject: Re: bug#70784: Abolish string resizing

From: Mattias Engdegård <[email-masked]>
Date: Sun, 24 Aug 2025 11:11:09 +0200

5 aug. 2025 kl. 15.49 skrev Mattias Engdegård <[email-masked]>:

> Otherwise, not much to say really. Everything works but that's a given; don't expect anything to break at this point.

Now on master.

By the way, here's some fun if you like coding puzzles:

(let ((s (copy-sequence "∀x∈A")))
  (aref s 3)
  (fillarray s ?§)
  (aref s 3))

See if you can figure out what happens without running it.

Naturally, that can be fixed very easily but the point here still stands: `fillarray` with a multibyte character is almost impossible to use in practice. And, no surprise, it seems impossible to find any such use of it in existing elisp code anywhere.

Most uses of `fillarray` on strings is for overwriting passwords and the like and that's fine, although `clear-string` is a better choice. It shouldn't cause anyone problem whatsoever if we make `fillarray` obey the `aset` rules; it would actually make it easier to use. Patch coming.