From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: New balance-windows Date: Tue, 09 Aug 2005 21:48:27 -0400 Message-ID: References: <87pssv3kai.fsf@thalassa.informatimago.com> <1123035204.009217.187300@g14g2000cwa.googlegroups.com> <87fytr3ea2.fsf@thalassa.informatimago.com> <200508061159.j76BxILQ018985@beta.mvs.co.il> <200508080927.j789R6Ss007055@beta.mvs.co.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123639090 4444 80.91.229.2 (10 Aug 2005 01:58:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2005 01:58:10 +0000 (UTC) Cc: knipknap@jabber.org, help-gnu-emacs@gnu.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 10 03:58:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2fqZ-0007bH-5u for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Aug 2005 03:57:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2fte-0003HJ-No for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Aug 2005 22:00:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2fs2-0002f0-1L for help-gnu-emacs@gnu.org; Tue, 09 Aug 2005 21:59:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2frz-0002e5-U3 for help-gnu-emacs@gnu.org; Tue, 09 Aug 2005 21:59:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2frv-0002bJ-8T; Tue, 09 Aug 2005 21:58:59 -0400 Original-Received: from [195.186.19.63] (helo=mail16.bluewin.ch) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E2fvk-00051t-Gt; Tue, 09 Aug 2005 22:02:56 -0400 Original-Received: from empanada.local (83.76.14.40) by mail16.bluewin.ch (Bluewin 7.2.063) id 42D280500047661B; Wed, 10 Aug 2005 01:48:24 +0000 Original-Received: by empanada.local (Postfix, from userid 502) id C39C35FFC0A; Tue, 9 Aug 2005 21:48:27 -0400 (EDT) Original-To: ehud@unix.mvs.co.il In-Reply-To: (Stefan Monnier's message of "Tue, 09 Aug 2005 20:05:47 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28600 gmane.emacs.devel:41815 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28600 > (if (< (car (window-edges)) (car (window-edges next))) > ;; The windows are side-by-side > (unless (zerop (setq diff (/ diff (window-height) 2))) > ;; Change things more smoothly. > (if (or (> diff 1) (< diff -1)) (setq diff (/ diff 2))) > (shrink-window diff) ^^ t [ I mistakenly removed this second arg before posting my code, thinking I was using a local extension of shrink-window, but I later noticed that it was not the case (I dropped this local extension when it collided with preserve-before). ] Stefan