From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: How to set the font of a region? Date: Thu, 29 Jul 2004 08:51:40 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <41090EFC.7020304@yahoo.com> References: <8765876iil.fsf@thalassa.informatimago.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1091113427 4969 80.91.224.253 (29 Jul 2004 15:03:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jul 2004 15:03:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 29 17:03:29 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BqCGE-0001p1-00 for ; Thu, 29 Jul 2004 16:51:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BqCJP-0001uQ-JZ for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jul 2004 10:55:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-X-Trace: news.uni-berlin.de osWR8tSGd/en+9Tu/w+dmwwYQ178leWXCLSWyE9dR/8dm4GEA= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:124543 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19878 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19878 Pascal Bourguignon wrote: > I tried this (on X, emacs 21.3.1): > > (let* ((default-font "-*-console-medium-r-normal-*-16-*-*-*-*-*-*-*") > (default-face (gensym "face"))) > (make-face default-face) > (set-face-font default-face default-font) > (dolist (font font-list) > (let ((face (gensym "face"))) > (make-face face) > (set-face-font face font) > (let ((start (point))) > (insert font) > (insert "\n") > (facemenu-add-face 'default start (point)) > (facemenu-set-face default-face start (point))) > (let ((start (point))) > (insert "The lazy dog jumped over the fast fox! (let [it {be} and] say) no.more;\n") > (facemenu-add-face 'default start (point)) > (facemenu-set-face face start (point)))))) > > --> > > --international-medium-r-normal--15-150-72-72-m-90-iso8859-1 > The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more; > --iris-medium-r-normal--10-100-72-72-m-60-iso8859-1 > The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more; > --iris-medium-r-normal--12-120-72-72-m-80-iso8859-1 > The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more; > --iris-medium-r-normal--13-130-72-72-m-90-iso8859-1 > The lazy dog jumped over the fast fox! (let [be {it} and] say) no.more; > ... > > > but all the text generated keeps the same default font. Why my > facemenu-set-face calls are without effect? I don't know. Does it help to use an interned symbol for the face? i.e. change (gensym "face") to (gentemp "face") after (require 'cl). -- Kevin Rodgers