From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: 'struct window' cleanup #2 Date: Tue, 26 Jun 2012 18:32:34 +0300 Message-ID: <83a9zq9jhp.fsf@gnu.org> References: <4FE827B6.6020306@yandex.ru> <4FE89369.2000708@gmx.at> <4FE896A9.3090002@yandex.ru> <4FE9643C.1090201@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1340724796 1875 80.91.229.3 (26 Jun 2012 15:33:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Jun 2012 15:33:16 +0000 (UTC) Cc: dmantipov@yandex.ru, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 26 17:33:14 2012 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 1SjXlS-0007Dx-50 for ged-emacs-devel@m.gmane.org; Tue, 26 Jun 2012 17:33:14 +0200 Original-Received: from localhost ([::1]:36388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjXlR-0002N6-Vz for ged-emacs-devel@m.gmane.org; Tue, 26 Jun 2012 11:33:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjXlL-0002Mj-Uo for emacs-devel@gnu.org; Tue, 26 Jun 2012 11:33:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjXlF-0003Ow-Fn for emacs-devel@gnu.org; Tue, 26 Jun 2012 11:33:07 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:46875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjXlF-0003OA-8F for emacs-devel@gnu.org; Tue, 26 Jun 2012 11:33:01 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M6800900DQE0F00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 26 Jun 2012 18:32:23 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M68007GNDTYFBR0@a-mtaout22.012.net.il>; Tue, 26 Jun 2012 18:32:23 +0300 (IDT) In-reply-to: <4FE9643C.1090201@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 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:151187 Archived-At: > Date: Tue, 26 Jun 2012 09:26:52 +0200 > From: martin rudalics > Cc: Stefan Monnier , > Emacs development discussions > > >> How about window_end_pos, window_end_vpos and window_end_valid? > > > > xdisp.c assigns w->buffer to w->window_end_valid, so it may be tricky. > > I suppose window_end_valid may be a bitfield; so, NILP > > (W->window_end_valid) > > becomes !W->window_end_valid, EQ (w->window_end_valid, w->buffer) > > becomes W->window_end_valid, etc. > > Indeed. Looks like a hack to detect whether the window still shows the > same buffer. Why a "hack"? Lisp object are good precisely for this reason: that you can give them values of different types of object. > Anyway, window_end_pos and window_end_vpos are the more > promising candidates (if Eli agrees). I don't object. But if we think that Lisp integers cause any significant slowdown during GC, we could special-case them in mark_object, because that is a no-op for integers. That would be less work and less potential bugs. > Can you see whether the part > > /* When splitting windows or for new windows, it happens that > redisplay is called with a nil window_end_vpos or one being > larger than the window. This should really be fixed in > window.c. I don't have this on my list, now, so we do > approximately the same as the old redisplay code. --gerd. */ > && INTEGERP (w->window_end_vpos) > > in xdisp.c still makes sense? No, there's no code anymore that sets it to nil.