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

From: Sean Whitton <[email-masked]>
Date: Wed, 19 Feb 2025 17:59:39 +0800

Hello,

On Mon 17 Feb 2025 at 06:54pm GMT, Stefan Kangas wrote:

> Testing like this:
>
> (setf (buffer-name) "test")
> (setf (buffer-string) "foo")
> (setf (buffer-substring 0 3) "hello")
> (setf (current-buffer) "somebuffer")
> (setf (frame-height) 20)
>
> I get these warnings:
>
>  Warning: ‘buffer-name’ is an obsolete generalized variable; use
>     ‘rename-buffer’ instead.
>  Warning: ‘buffer-string’ is an obsolete generalized variable.
>  Warning: ‘current-buffer’ is an obsolete generalized variable; use
>     ‘set-buffer’ instead.
>  Warning: ‘frame-height’ is an obsolete generalized variable; use
>     ‘set-frame-height’ instead.
>  Warning: ‘buffer-substring’ is an obsolete generalized variable.
>
> So only `buffer-string' and `buffer-substring' seem to lack alternative
> functions that could be used instead.

I would propose that we should keep anything where there isn't a simple
set-* function to take its place.
So at least buffer-string and buffer-substring, and possibly more.

(I'm a bit biased here as I never understood deprecating any of these.)

-- 
Sean Whitton