GNU bug report logs - #71370
30.0.50; Please un-obsolete buffer-substring as a generalized variable

Previous Next

Package: emacs;

Reported by: Adam Porter <adam <at> alphapapa.net>

Date: Wed, 5 Jun 2024 01:34:02 UTC

Severity: wishlist

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92 <at> posteo.net>, Michael Heerdegen <michael_heerdegen <at> web.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>, Adam Porter <adam <at> alphapapa.net>, Andrea Corallo <acorallo <at> gnu.org>
Subject: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a generalized variable
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




This bug report was last modified 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.