From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: Fringes again Date: Sat, 25 May 2002 01:48:53 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <877klyie6t.fsf@tc-1-100.kawasaki.gol.ne.jp> <87661e2ytn.fsf@tc-1-100.kawasaki.gol.ne.jp> <5xsn4hdudc.fsf@kfs2.cua.dk> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1022284424 11791 127.0.0.1 (24 May 2002 23:53:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 24 May 2002 23:53:44 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17BOsS-000344-00 for ; Sat, 25 May 2002 01:53:44 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17BP8Z-00085U-00 for ; Sat, 25 May 2002 02:10:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17BOsw-0000kO-00; Fri, 24 May 2002 19:54:14 -0400 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17BOqc-0000YE-00 for ; Fri, 24 May 2002 19:51:50 -0400 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.3/8.12.3) with ESMTP id g4ONphWa002345; Sat, 25 May 2002 01:51:43 +0200 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: <5xsn4hdudc.fsf@kfs2.cua.dk> (storm@cua.dk's message of "25 May 2002 01:00:15 +0200") Mail-Copies-To: nobody Original-Lines: 29 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4364 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4364 storm@cua.dk (Kim F. Storm) writes: > Actually, the default is to take 2x8 = 16 pixels and find the minimum > number of characters in the default font that is at least 16 pixels wide, > and then distribute that space evenly between the two fringes. > > Suppose the default font width is 6 pixels. This needs 3 characters = > 18 pixels to hold the fringes => 9 pixels for each fringe. > > If an odd number of pixels are allocated, the extra pixel is > added to the right fringe. > >> Right, but how do you programmatically calculate that? > > Something like > > (/ (* (/ (+ (* 2 8) (frame-char-width) -1) > (frame-char-width)) > (frame-char-width)) > 2) Hm. Will this work for e.g. `default-frame-alist'? It need to have integers, not expressions that can vary depending on the font or display (consider multi-head X where the screens has different resolutions, `frame-char-width' would probably return different values depending on which screen it is on). It doesn't look very reliable to calculate "half fringe width" (if there isn't something better than the above), so perhaps the "half width" option should be removed. Opinions?