From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Proposed removal of struct frame->select_mini_window_flag. Date: Wed, 18 May 2022 19:19:49 +0300 Message-ID: <83pmkaertm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 18 18:26:43 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrMVW-0006vw-OC for ged-emacs-devel@m.gmane-mx.org; Wed, 18 May 2022 18:26:42 +0200 Original-Received: from localhost ([::1]:44856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrMVV-0007oq-Ja for ged-emacs-devel@m.gmane-mx.org; Wed, 18 May 2022 12:26:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrMOy-00064H-ER for emacs-devel@gnu.org; Wed, 18 May 2022 12:19:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrMOx-0004VK-Ik; Wed, 18 May 2022 12:19:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BCfnkYENf/WI2MCeviSRDg/LMCI6cvUEZTb1ckr5VPU=; b=C8HRfmxSTThz LEKykMAc9s5ozkUC/Qm61jc7yxX875t2XsdEN/1DT6yRgN4xRSPnsdQLf1CIiroD4Ju4MtKJHa2jf vbcF0812BiX0JH8vulyVYSPsmV4GH5QN56DxQtsXe7bIouqweobwWvuNbcPj9MuxFLWjPMXXj+089 2QgxmVV9ThfyBGYyDJ6uDSlVxsblsSgRoBc2YQuivagMYXWiFhV0QaL/U9I2z3csPPhO0DmBa44EF Do4u1FP7JxbMC9BErchRVVzHwPF96tseeqG/e1xsoBGFrpAboGa6f9OAGUdQTHcQ/3esugM7XiMse PLWxgZ9JVLhTClGJ5OFqHQ==; Original-Received: from [87.69.77.57] (port=1208 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrMOx-0003B6-2T; Wed, 18 May 2022 12:19:55 -0400 In-Reply-To: (message from Alan Mackenzie on Wed, 18 May 2022 15:56:28 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289925 Archived-At: > Date: Wed, 18 May 2022 15:56:28 +0000 > From: Alan Mackenzie > > I came across struct frame->select_mini_window_flag while looking at bug > #55414. > > More accurately, my attention was diverted for over an hour, trying to > work out how this boolean could be maintained in a consistent state, > given that it gets splatted to false every time Fselect_window gets > called. > > Then it dawned on me that the variable has no function - if the > mini-window is the selected window, this is fully represented by struct > frame->selected_window's value. > > So, I propose to remove this variable and all its "uses". Does anybody > object? I don't think I follow. Did you see this fragment in frame.c: sf->select_mini_window_flag = MINI_WINDOW_P (XWINDOW (sf->selected_window)); selected_frame = frame; move_minibuffers_onto_frame (sf, for_deletion); if (f->select_mini_window_flag && !NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt))) f->selected_window = f->minibuffer_window; How will this logic work without that flag?