From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Randy Haddox Newsgroups: gmane.emacs.help Subject: font-lock-add-keywords Date: Thu, 05 Aug 2004 10:08:16 -0500 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1091718496.4254.40.camel@haddox.ds.amrdec.army.mil> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1091718547 21154 80.91.224.253 (5 Aug 2004 15:09:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Aug 2004 15:09:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 05 17:08:55 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 1BsjrT-00007u-00 for ; Thu, 05 Aug 2004 17:08:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bsjv0-0000m4-It for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Aug 2004 11:12:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bsjuo-0000lm-2S for help-gnu-emacs@gnu.org; Thu, 05 Aug 2004 11:12:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bsjun-0000lT-4A for help-gnu-emacs@gnu.org; Thu, 05 Aug 2004 11:12:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bsjun-0000lQ-0F for help-gnu-emacs@gnu.org; Thu, 05 Aug 2004 11:12:21 -0400 Original-Received: from [136.205.157.100] (helo=pcgw1.redstone.army.mil) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bsjqy-0004tf-Qs for help-gnu-emacs@gnu.org; Thu, 05 Aug 2004 11:08:25 -0400 Original-Received: from mrdec-owa.ds.amrdec.army.mil (mrdec-exch.amrdec.army.mil [199.209.144.25]) by pcgw1.redstone.army.mil (8.12.9/8.12.9) with ESMTP id i75F8MRB007211 for ; Thu, 5 Aug 2004 10:08:22 -0500 (CDT) Original-Received: from [10.0.144.50] (10.0.144.50 [10.0.144.50]) by mrdec-owa.ds.amrdec.army.mil with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id QA0G7DQ1; Thu, 5 Aug 2004 10:08:21 -0500 Original-To: help-gnu-emacs@gnu.org X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 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:19995 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19995 I am using code in .emacs to find and color code various keywords. I haven't had any luck handling the "if" keyword when it doesn't starting in column 1 (ie, has leading whitespace). Most of the time the "if" will start at the beginning. (defface test-keyword6-face '((t (:foreground "gold"))) "Keyword face.") (font-lock-add-keywords 'latex-mode '(("^if\\|then\\|else\\|endif" . 'test-keyword6-face)) ) Any help would be much appreciated. Thanks, Randy