From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Adding a font-lock face to a major mode Date: Thu, 5 Jan 2006 11:44:20 -0900 Message-ID: <20060105204420.GK1812@johnsons-web.com> References: <87y81upnfg.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136494133 31292 80.91.229.2 (5 Jan 2006 20:48:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 20:48:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 05 21:48:46 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Euc2K-0001VB-HV for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jan 2006 21:48:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Euc44-0004sD-Dp for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jan 2006 15:50:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eubzh-0002xH-SM for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 15:45:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eubzc-0002v6-Fc for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 15:45:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eubzb-0002uX-Kb for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 15:45:51 -0500 Original-Received: from [208.218.214.44] (helo=ns3.cniweb.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Euc1E-0003V5-LZ for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 15:47:32 -0500 Original-Received: from linus.johnson.com (rdbck-static-445.palmer.mtaonline.net [64.4.232.191]) by ns3.cniweb.net (8.13.5/8.13.5) with ESMTP id k05KhEQ8022940 for ; Thu, 5 Jan 2006 15:43:15 -0500 (EST) Original-Received: from linus.johnson.com (localhost.johnson.com [127.0.0.1]) by linus.johnson.com (8.12.8/8.12.8) with ESMTP id k05KiKZt014857 for ; Thu, 5 Jan 2006 11:44:20 -0900 Original-Received: (from tim@localhost) by linus.johnson.com (8.12.8/8.12.8/Submit) id k05KiK3T014855 for help-gnu-emacs@gnu.org; Thu, 5 Jan 2006 11:44:20 -0900 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Tim Johnson , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87y81upnfg.fsf-monnier+gnu.emacs.help@gnu.org> User-Agent: Mutt/1.4.2.1i 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32460 Archived-At: * Stefan Monnier [060105 10:19]: > > I would like to be able to add a font-lock face to a major mode at load > > time. > > Try font-lock-add-keywords. Works like a charm the kicker, however, is that I'm tasked with solutions that can be applied to both gnu and X emacs. Xemacs does not have that function and furthermore, simply exploiting the code doesn't work either, because Xemacs apparently has a significantly different structure for syntax highlighting. Thanks for the tip Stefan. For now it will be a gnu-only solution. Later I can use an 'cond form to test the Xemacs and provide an alternate code. cheers tim -- Tim Johnson http://www.alaska-internet-solutions.com