From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.help Subject: Re: Coloring a command in LateX-mode? Date: 23 Jun 2003 16:27:39 -0400 Organization: Yale University Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5lisqw7d50.fsf@rum.cs.yale.edu> References: <87n0g97z85.fsf@ortler.iwr.uni-heidelberg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056402830 22038 80.91.224.249 (23 Jun 2003 21:13:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Jun 2003 21:13:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 23 23:13:44 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19UYdD-0005ii-00 for ; Mon, 23 Jun 2003 23:13:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19UYW8-0002S9-Ri for gnu-help-gnu-emacs@m.gmane.org; Mon, 23 Jun 2003 17:06:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!canoe.uoregon.edu!news.wss.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Original-NNTP-Posting-Host: rum.cs.yale.edu Original-X-Trace: news.wss.yale.edu 1056400062 17804 128.36.229.169 (23 Jun 2003 20:27:42 GMT) Original-X-Complaints-To: news@news.wss.yale.edu Original-NNTP-Posting-Date: Mon, 23 Jun 2003 20:27:42 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 23 Jun 2003 16:27:39 -0400, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:114661 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11154 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11154 >>>>> "Nicolas" == Nicolas Neuss writes: > \ifg{Hallo}{Hello}! If the `Hallo' and `Hello' parts are short enough (a couple lines at most), you can use font-lock-add-keywords in your tex-mode-hook. Otherwise, you'll have to use something more complex and it's probably not worth the trouble. If you really insist on doing it, I'd recommend you look at how perl-mode and cperl-mode handle the s/.../.../ command highlighting (they use two different approaches). For perl-mode, you'll have to look at the version that's in Emacs-CVS because the version in Emacs-21.3 does not have this code yet. Stefan