From xemacs-m  Sun Jan 12 17:31:48 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id RAA02466 for <xemacs-beta@xemacs.org>; Sun, 12 Jan 1997 17:31:47 -0600 (CST)
Received: (from steve@localhost)
          by altair.xemacs.org (8.8.4/8.8.4)
	  id PAA18285; Sun, 12 Jan 1997 15:41:46 -0800
Sender: steve@xemacs.org
To: xemacs-beta@xemacs.org
Subject: Re: 19.15b90: [PATCH] window.el: shrink-window-if-larger-than-buffer
References: <QQbyfi01495.199701122039@crystal.WonderWorks.COM> <97Jan12.173254edt.10634(1)@jupiter.scs.Ryerson.CA>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Dave Mason's message of Sun, 12 Jan 1997 17:32:53 -0500
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII
Date: 12 Jan 1997 15:41:45 -0800
Message-ID: <m2hgkmea12.fsf@altair.xemacs.org>
Lines: 41
X-Mailer: Red Gnus v0.80/XEmacs 20.0

Dave Mason writes:

> Kyle Jones wrote:
>> I got tired of the *Completions* buffer and friends creeping up
>> in the buffer stack.
>> 
>> By the way, the fact that this function modifies the buffer is
>> pretty sick.

> Bleah!!!

> I removed the inserts, which removes the need for unwind-protect, and
> a whole pile of other stuff.  And the whole (or window w) is junk
> because it's already done at the beginning of the function.

> Maybe I'm missing something big here, but there seems to be a huge
> amount of cruft in this code!

> This is diff'ed against 19.14.

This file hasn't been changed since 19.14.

> Somebody better try this code before throwing it in.  I'm nervous
> removing 1/2 the code in something that's been there for a long time.
> I also didn't have as many places to try it, as 19.14 doesn't use it
> for help buffers, but it works where I tried it.  This is the kind of
> place where there *might* be an off-by-one error.

Yup.  The shrunken window is now one 1 line too short, and I'm seeing
it clipped in half. :-(

> ../Dave

> ! 	      (shrink-window (- height n)
->	      (shrink-window (- height n 1)

And that seems to make it O.K.
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
Today's environment is 20.0 XEmacs Lucid (beta91) and Red Gnus v0.80

