From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Fringes again Date: 26 May 2002 01:06:47 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xk7pr25fc.fsf@kfs2.cua.dk> 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 1022364532 4852 127.0.0.1 (25 May 2002 22:08:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 25 May 2002 22:08:52 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17BjiV-0001G9-00 for ; Sun, 26 May 2002 00:08:51 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17Bjz4-00049A-00 for ; Sun, 26 May 2002 00:25:58 +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 17Bjiu-0008HQ-00; Sat, 25 May 2002 18:09:16 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17Bjfw-0008EG-00 for ; Sat, 25 May 2002 18:06:12 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 89F1E7C017 for ; Sat, 25 May 2002 22:06:03 +0000 (GMT) Original-To: emacs-devel@gnu.org In-Reply-To: Original-Lines: 38 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 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:4384 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4384 Simon Josefsson writes: > 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? IMO, reducing the fringe width below 8 pixels really doesn't make sense. But if you want the minimum fringe width (i.e. half the width of the default face width), simply set both widths to 1. -- Kim F. Storm http://www.cua.dk