From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: recenter-ratio (was: Re: Toolbars on MacOSX) Date: Thu, 13 May 2004 11:58:57 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040512.171251.91443934.mituharu@math.s.chiba-u.ac.jp> <87wu3h0wv6.fsf_-_@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1084453746 29219 80.91.224.253 (13 May 2004 13:09:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 May 2004 13:09:06 +0000 (UTC) Cc: steventamm@mac.com, YAMAMOTO Mitsuharu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 13 15:08:53 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOFxE-0003Gj-00 for ; Thu, 13 May 2004 15:08:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOFxE-0004vj-00 for ; Thu, 13 May 2004 15:08:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOFEM-0005J5-QX for emacs-devel@quimby.gnus.org; Thu, 13 May 2004 08:22:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BOFDL-0005Hq-84 for emacs-devel@gnu.org; Thu, 13 May 2004 08:21:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BOFCn-0005B7-SK for emacs-devel@gnu.org; Thu, 13 May 2004 08:21:25 -0400 Original-Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BOCzn-00030Y-6R for emacs-devel@gnu.org; Thu, 13 May 2004 05:59:19 -0400 Original-Received: from hermes.suse.de (Hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 12A165A0EB1; Thu, 13 May 2004 11:59:17 +0200 (CEST) Original-To: Juri Linkov X-Yow: Place me on a BUFFER counter while you BELITTLE several BELLHOPS in the Trianon Room!! Let me one of your SUBSIDIARIES! In-Reply-To: <87wu3h0wv6.fsf_-_@mail.jurta.org> (Juri Linkov's message of "Thu, 13 May 2004 07:33:33 +0300") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23313 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23313 Juri Linkov writes: > @@ -11722,7 +11724,7 @@ > /* If point does not appear, try to move point so it does > appear. The desired matrix has been built above, so we > can use it here. */ > - new_vpos =3D window_box_height (w) / 2; > + new_vpos =3D window_box_height (w) / XFLOATINT (Vrecenter_ratio); > } > =20 > if (!make_cursor_line_fully_visible (w, 0)) > @@ -11922,7 +11924,7 @@ > /* Finally, just choose place to start which centers point */ > =20 > recenter: > - centering_position =3D window_box_height (w) / 2; > + centering_position =3D window_box_height (w) / XFLOATINT (Vrecenter_= ratio); > =20 > point_at_top: > /* Jump here with centering_position already set to 0. */ I think you need to be careful to avoid an infinite redisplay loop when recenter-ratio does not contain a number. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."