bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66890: 29.1; buffer-size should also accept the buffer's name as str


From: Eli Zaretskii
Subject: bug#66890: 29.1; buffer-size should also accept the buffer's name as string argument
Date: Thu, 02 Nov 2023 08:32:38 +0200

> From: Daniel Nagy <danielnagy@posteo.de>
> Date: Wed, 01 Nov 2023 16:31:01 +0000
> 
> The current signature of #'buffer-size is:
> 
>     (buffer-size &optional BUFFER)
> 
> It can only handle actual buffer objects as the argument. Could it be
> made to accept the buffer name as a string as well? So that it's
> signature would become:
> 
>     (buffer-size &optional BUFFER-OR-NAME)
> 
> Other functions, like #'get-buffer already do this.

It's very easy to get the buffer from its name.  You could do

  (buffer-size (get-buffer BUFFER-OR-NAME))

So I wonder whether it is worth our while to convert more functions to
accept both buffers and names of buffers.

Stefan, WDYT?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]