Subject: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a generalized variable

From: Eli Zaretskii <[email-masked]>
Date: Sun, 23 Mar 2025 16:10:15 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: Stefan Kangas <[email-masked]>,  [email-masked],
>   [email-masked],  [email-masked],  [email-masked],
>   [email-masked],  [email-masked]
> Date: Sun, 23 Mar 2025 10:00:19 -0400
> 
> > That is not a necessary condition for making buffer-substring a
> > generalized variable.  We could have an internal function, maybe not
> > even exposed to Lisp, to replace the buffer substring.
> 
> We do, exposed to ELisp:
> 
>     (macroexpand '(setf (buffer-substring A B) C))
> =~>
>     (cl--set-buffer-substring A B C)

I meant that we could make the body of cl--set-buffer-substring a
single subr call, not a delete-region followed by insert.  Or even
completely replace cl--set-buffer-substring with that subr.