From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: 'struct window' cleanup #2 Date: Tue, 26 Jun 2012 09:26:52 +0200 Message-ID: <4FE9643C.1090201@gmx.at> References: <4FE827B6.6020306@yandex.ru> <4FE89369.2000708@gmx.at> <4FE896A9.3090002@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340695616 22085 80.91.229.3 (26 Jun 2012 07:26:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Jun 2012 07:26:56 +0000 (UTC) Cc: Stefan Monnier , Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 26 09:26:55 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 1SjQAo-0004sZ-Mu for ged-emacs-devel@m.gmane.org; Tue, 26 Jun 2012 09:26:54 +0200 Original-Received: from localhost ([::1]:50473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjQAo-000299-MY for ged-emacs-devel@m.gmane.org; Tue, 26 Jun 2012 03:26:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjQAl-000294-UX for emacs-devel@gnu.org; Tue, 26 Jun 2012 03:26:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjQAj-0004io-Qt for emacs-devel@gnu.org; Tue, 26 Jun 2012 03:26:51 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:49344) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SjQAj-0004ic-Gd for emacs-devel@gnu.org; Tue, 26 Jun 2012 03:26:49 -0400 Original-Received: (qmail invoked by alias); 26 Jun 2012 07:26:47 -0000 Original-Received: from 62-47-63-160.adsl.highway.telekom.at (EHLO [62.47.63.160]) [62.47.63.160] by mail.gmx.net (mp070) with SMTP; 26 Jun 2012 09:26:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX197tyZHwmZ7+90zAhlP7CybDQ+38uUNGlPndkaLqc Yf2t8VL2QJAiq+ In-Reply-To: <4FE896A9.3090002@yandex.ru> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.22 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:151172 Archived-At: >> 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. Anyway, window_end_pos and window_end_vpos are the more promising candidates (if Eli agrees). 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? IIUC window_end_vpos is always an integer. martin