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: 'struct window' cleanup #3 Date: Wed, 27 Jun 2012 09:32:15 -0400 Message-ID: References: <4FE827B6.6020306@yandex.ru> <4FE89369.2000708@gmx.at> <4FE896A9.3090002@yandex.ru> <4FE9643C.1090201@gmx.at> <83a9zq9jhp.fsf@gnu.org> <83lij98nhj.fsf@gnu.org> <4FEAB1EA.3000307@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340803954 11053 80.91.229.3 (27 Jun 2012 13:32:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2012 13:32:34 +0000 (UTC) Cc: , emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 15:32:29 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 1SjsM5-0005HS-9s for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2012 15:32:25 +0200 Original-Received: from localhost ([::1]:36405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjsM5-0000Yy-9t for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2012 09:32:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjsM3-0000Yt-5F for emacs-devel@gnu.org; Wed, 27 Jun 2012 09:32:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjsLy-0003TK-Gu for emacs-devel@gnu.org; Wed, 27 Jun 2012 09:32:22 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:46524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjsLy-0003Sk-CE for emacs-devel@gnu.org; Wed, 27 Jun 2012 09:32:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09sr+Nd/2dsb2JhbABEtBGBCIIVAQEEAScvIwULCw4mEhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="192187179" Original-Received: from 108-175-227-93.dsl.teksavvy.com (HELO pastel.home) ([108.175.227.93]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Jun 2012 09:32:15 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 6609B52030; Wed, 27 Jun 2012 09:32:15 -0400 (EDT) In-Reply-To: <4FEAB1EA.3000307@yandex.ru> (Dmitry Antipov's message of "Wed, 27 Jun 2012 11:10:34 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:151214 Archived-At: > 2. Fields hscroll and min_hscroll are good candidates for conversion > too, but this requires some redesign of `struct saved_window', most > probably to yet another pseudovector. Actually, you can just leave the struct saved_window unchanged, and convert to/from Lisp_Object when copying the (min_)hscroll to/from the struct saved_window. > /* Right after splitting windows, last_point may be nil. */ > && INTEGERP (w->last_point); > My tests never shows zero here, so I'm installing assertion instead. Since positions are strictly positive, you can use -1 as meaning "nil". (I recommend -1 over 0, because it's "more different"). Stefan