From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Getting rid of selected_window Date: Fri, 29 Nov 2013 09:38:35 -0500 Message-ID: References: <5298804A.5040405@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385735929 13240 80.91.229.3 (29 Nov 2013 14:38:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Nov 2013 14:38:49 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 29 15:38:54 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VmPDZ-0005OQ-Ms for ged-emacs-devel@m.gmane.org; Fri, 29 Nov 2013 15:38:53 +0100 Original-Received: from localhost ([::1]:47627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmPDZ-00010p-Ar for ged-emacs-devel@m.gmane.org; Fri, 29 Nov 2013 09:38:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmPDQ-00010f-CP for emacs-devel@gnu.org; Fri, 29 Nov 2013 09:38:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmPDJ-00012f-2C for emacs-devel@gnu.org; Fri, 29 Nov 2013 09:38:44 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:22659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmPDI-00012Y-UY for emacs-devel@gnu.org; Fri, 29 Nov 2013 09:38:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KEh/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGWe4UegV6DFQ X-IPAS-Result: Av4EABK/CFHO+KEh/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGWe4UegV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40683180" Original-Received: from 206-248-161-33.dsl.teksavvy.com (HELO pastel.home) ([206.248.161.33]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Nov 2013 09:38:36 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D966460EFA; Fri, 29 Nov 2013 09:38:35 -0500 (EST) In-Reply-To: <5298804A.5040405@yandex.ru> (Dmitry Antipov's message of "Fri, 29 Nov 2013 15:53:46 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165874 Archived-At: > I'm trying to get rid of selected_window, with an intent to completely > cleanup corner cases where FRAME_SELECTED_WINDOW (selected_frame) is > not the same as selected_window and avoid redundant synchronization of > them. Comments are welcome. Indeed, I think that the two are now 100% synchronized, so we should be able to get rid of `selected-window'. A few comments, tho: - Shouldn't we replace uses of `selected_window' with a call to an inlined function? I.e. either make Fselected_window inlinable? - If you want SELECTED_WINDOW (which should be an inlined function), then I think we should define it as XWINDOW (Fselected_window ()) rather than providing a redundant definition. - SELECTED_BUFFER should be a function rather than a macro and it should return a Lisp_Object rather than a struct buffer*. Stefan