From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Customizing fontsets Date: Fri, 2 May 2003 15:32:57 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305020632.PAA16368@etlken.m17n.org> References: <200305010720.QAA14963@etlken.m17n.org> <87llxqorkr.fsf@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1051857259 11670 80.91.224.249 (2 May 2003 06:34:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 2 May 2003 06:34:19 +0000 (UTC) Cc: alkibiades@gmx.de Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 02 08:34:18 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19BU7e-000325-00 for ; Fri, 02 May 2003 08:34:18 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19BU94-0007gn-00 for ; Fri, 02 May 2003 08:35:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BU7f-0001lo-07 for emacs-devel@quimby.gnus.org; Fri, 02 May 2003 02:34:19 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19BU7S-0001gB-00 for emacs-devel@gnu.org; Fri, 02 May 2003 02:34:06 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19BU6k-0001IX-00 for emacs-devel@gnu.org; Fri, 02 May 2003 02:33:24 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BU6O-0000Vr-00; Fri, 02 May 2003 02:33:00 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h426Wwo16336; Fri, 2 May 2003 15:32:58 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h426WvA11241; Fri, 2 May 2003 15:32:57 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id PAA16368; Fri, 2 May 2003 15:32:57 +0900 (JST) Original-To: alex@gnu.org In-reply-to: <87llxqorkr.fsf@gnu.org> (message from Alex Schroeder on Fri, 02 May 2003 07:17:24 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13610 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13610 In article <87llxqorkr.fsf@gnu.org>, Alex Schroeder writes: > Oliver Scholz writes: >> But wouldn't it be an option to add a `custom-set-fontsets' besides >> `custom-set-faces' and `custom-set-variables'? >> In fact I started to work on it. > I am happy to see somebody work on it! Me too!!! >> Currently I wonder what the default values should be that a >> "fontset-widget" should present to the user. The return-value of >> `fontset-info' is simply to large, I think. It seems weird that a user >> should specify a fontset covering two or three charsets in her .emacs >> or in .Xresources -- and is confronted with a list of dozens of >> charsets then, when she wants to customize it later. > I don't understand. When you run M-x customize-fontset RET > fontset-default RET, you expect to see a widget that explains the > value of "fontset-default", and offer a way to change it. Thus, all > the info returned by (fontset-info "fontset-default") must be visible > and editable at some point. But, it is true that the value of fontset-info is very hard to customize. A fontset is created by new-fontset, and is modified by the sequence of set-fontset-font. In the resulting fontset, the specified data are scattered around in the char-table of the fontset. I think the following idea will solve this problem. The arguemnt FONTLIST of new-fontset is a list of this form: ((TARGET . FONT-SPEC) ...) TARGET is a character, a cons (FROM-CHAR . TO-CHAR), or a charset. FONT-SPEC is (FAMILY . REGISTRY) or FONT-NAME. The function set-fontset-font also takes the arguments TARGET and FONT-SPEC. In other words, a fontset can be re-created by the sequence of (TARGET . FONT-SPEC). So how about recording that sequence as a list in each fontset (the order is important). I think it's far user-friendly to customize that list than to customize char-table elements. In addition, we can use the normal customization facility for a list (INS, DEL) at the top level. --- Ken'ichi HANDA handa@m17n.org