Subject: bug#77985: 31.0.50; infinite loop in `make-frame-names-alist`

From: Al Haji-Ali <[email-masked]>
Date: Mon, 28 Apr 2025 12:04:09 +0100

On 27/04/2025, martin rudalics wrote:

> The attached patch includes my earlier proposal for fixing this and also
> reverts the return value of 'make-frame-names-alist'.  Please try it.

This patch passed all my, admittedly limited, test cases.

In the patch, `make-frame-names-alist` returns only frames on the same display. I don't know if this is a behaviour change or to make it consistent with `next-frame` (the doc of `next-frame` doesn't mention displays -- might worth clarifying there if this is the behaviour).

Another minor/unimportant point (feel free to ignore) is that the patch also allows `make-frame-names-alist` to accept a FRAME argument. I think it would be more natural to return frames on the same display as the passed FRAME rather than the selected one.