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

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

bug#64398: Buffer list


From: Po Lu
Subject: bug#64398: Buffer list
Date: Thu, 05 Oct 2023 15:21:05 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Kangas <stefankangas@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> It's tempting to just bump this to some similarly conservative value
>>> like 15 or 12 on graphical displays, and be done with it.
>>
>> We could do that, but then 15 is the maximum value we could use, since
>> it makes the menu take 24 lines, which is the largest value possible
>> with 24-line TTY frames.
>
> How about something like the below?
>
> diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
> index 5e837485db3..14d8d664d58 100644
> --- a/lisp/menu-bar.el
> +++ b/lisp/menu-bar.el
> @@ -2314,14 +2314,16 @@ menu-bar-select-yank
>  
>  ;;; Buffers Menu
>
> -(defcustom buffers-menu-max-size 10
> +(defcustom buffers-menu-max-size (if (display-graphic-p) 15 10)
>    "Maximum number of entries which may appear on the Buffers menu.
> -If this is 10, then only the ten most-recently-selected buffers are shown.
> -If this is nil, then all buffers are shown.
> -A large number or nil slows down menu responsiveness."
> -  :type '(choice integer
> -              (const :tag "All" nil))
> -  :group 'menu)
> +If this is a number, only that many most-recently-selected
> +buffers are shown.
> +If this is nil, all buffers are shown."
> +  :type '(choice natnump
> +                 (const :tag "All" nil))
> +  :group 'menu
> +  :version "30.1")
>
>  (defcustom buffers-menu-buffer-name-length 30
>    "Maximum length of the buffer name on the Buffers menu.

This doesn't work because menu-bar.el is preloaded and additionally
because Emacs supports creating both GUI and terminal frames in the same
process, whereas a feature can only be loaded once, with the value of
display-graphic-p subject to whatever frame is selected at the time it
is loaded.  Why not set it to 15 and call it a day?

TIA.




reply via email to

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