From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Herbert Euler Newsgroups: gmane.emacs.devel Subject: RE: A suggestion on `x-select-font' Date: Fri, 27 Jun 2008 18:52:59 +0800 Message-ID: References: <4864AFD2.9020301@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1214564260 591 80.91.229.12 (27 Jun 2008 10:57:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Jun 2008 10:57:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 27 12:58:24 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KCBel-0002w3-Sr for ged-emacs-devel@m.gmane.org; Fri, 27 Jun 2008 12:58:20 +0200 Original-Received: from localhost ([127.0.0.1]:42224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCBdw-0004JX-3z for ged-emacs-devel@m.gmane.org; Fri, 27 Jun 2008 06:57:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCBZn-0007OG-K6 for emacs-devel@gnu.org; Fri, 27 Jun 2008 06:53:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCBZl-0007LJ-Qa for emacs-devel@gnu.org; Fri, 27 Jun 2008 06:53:09 -0400 Original-Received: from [199.232.76.173] (port=48069 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCBZl-0007Ka-2q for emacs-devel@gnu.org; Fri, 27 Jun 2008 06:53:09 -0400 Original-Received: from bay0-omc2-s23.bay0.hotmail.com ([65.54.246.159]:14813) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KCBZc-0005hh-W1; Fri, 27 Jun 2008 06:53:01 -0400 Original-Received: from BAY143-W3 ([65.55.154.38]) by bay0-omc2-s23.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 27 Jun 2008 03:53:00 -0700 X-Originating-IP: [216.145.54.158] Importance: Normal In-Reply-To: <4864AFD2.9020301@gnu.org> X-OriginalArrivalTime: 27 Jun 2008 10:53:00.0389 (UTC) FILETIME=[F7532950:01C8D843] X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100025 Archived-At: >> The attached patch does what I suggested: It makes the font chooser in >> Emacs more like other X appications by setting the user selected font >> in the font chooser dialog. There are several problems in it, though: > > These problems might be avoided by making x-select-font take the default > selection as an argument. Actually I suggest the following signature: > > (defun x-select-font (&optional frame default-font must-match) > > Where default font is a font-spec/entity/object to use as the initial > selection, and must-match is a font-spec for filtering the list of > available fonts (eg by specifiying charset, fixed width fonts only, > bold, italic etc). Ah, that's a better idea. But instead of having to be only a font-spec, I think it might make sense if must-match can be also a function, which returns a list of fonts when called with no argument. Is this worthy implementing? Regards, Guanpeng Xu _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE