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

From: Al Haji-Ali <[email-masked]>
Date: Tue, 22 Apr 2025 12:01:38 +0100

I am running into an infinite loop in the function `make-frame-names-alist` which is called from `select-frame-by-name`.

The infinite loop happens when a frame with the property `no-other-frame` is the currently selected one. Starting with `emacs -Q`, the following code demonstrates the issue:

(with-selected-frame (make-frame '((no-other-frame . t)))
    (make-frame-names-alist))