Subject: bug#75828: [PATCH] Correct make-frame docstring vis-a-vis make_frame.c

From: Ship Mints <[email-masked]>
Date: Mon, 27 Jan 2025 11:54:24 -0500

Hi, Martin,

These are the two options on the table?

(let ((frame-inhibit-make-frame-hidden-buffer-check t))
  (with-current-buffer " *string-pixel-width*"
    (make-frame)))
;; could also do this if users want the behavior all the time
(setq frame-inhibit-make-frame-hidden-buffer-check t)

(with-current-buffer " *string-pixel-width*"
  (setq-local frame-inhibit-make-frame-hidden-buffer-check t)
  (make-frame)
  (kill-local-variable 'frame-inhibit-make-frame-hidden-buffer-check))

I prefer the former over the latter. It seems harmonious with other
frame-related controls such as frame-resize-pixelwise
and frame-inhibit-implied-resize, unless I'm missing some subtlety, which I
surely am.

-Stephane

On Sun, Jan 26, 2025 at 3:53 AM martin rudalics <[email-masked]> wrote:

>  > If we use a buffer local, I'll have to remove it after make-frame is
>  > complete. If a let-bound variable, users would not have to remember to
> do
>  > this. Either way, make_frame needs to ignore the specified buffer that
>  > happens to be hidden.
>
> But a variable is not by design "let-bound".  When this variable is
> automatically buffer-local a user can choose
>
> - whether a specific hidden buffer may be shown or not by setting the
>    buffer-local value
>
> - whether any hidden buffer may be shown or not by setting the default
>    value
>
> - whether only a specific 'make-frame' call is affected by using a
>    let-binding.
>
> martin
>