From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: font-lock basics? Date: Mon, 31 Jan 2005 13:03:38 +0900 Message-ID: Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107144873 13836 80.91.229.6 (31 Jan 2005 04:14:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2005 04:14:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 05:14:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvSxG-0007pL-00 for ; Mon, 31 Jan 2005 05:14:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvT9u-0001nA-E3 for ged-emacs-devel@m.gmane.org; Sun, 30 Jan 2005 23:27:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvT76-0000ZO-Du for emacs-devel@gnu.org; Sun, 30 Jan 2005 23:24:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvT6s-0000Sb-6i for emacs-devel@gnu.org; Sun, 30 Jan 2005 23:24:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvT6r-0000QU-Ei for emacs-devel@gnu.org; Sun, 30 Jan 2005 23:24:21 -0500 Original-Received: from [202.32.8.214] (helo=tyo201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CvSmu-0000Qi-NE; Sun, 30 Jan 2005 23:03:45 -0500 Original-Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.162] (may be forged)) by tyo201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id j0V43fe12307; Mon, 31 Jan 2005 13:03:41 +0900 (JST) Original-Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id j0V43eh13136; Mon, 31 Jan 2005 13:03:40 +0900 (JST) Original-Received: from edtmg05.lsi.nec.co.jp ([10.26.17.202]) by mailsv5.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id j0V43e123069; Mon, 31 Jan 2005 13:03:40 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg05.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id j0V43dGw029746; Mon, 31 Jan 2005 13:03:39 +0900 (JST) Original-Received: from mctpc71 (mctpc71.ucom.lsi.nec.co.jp [10.30.118.121]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id j0V43cKt005475; Mon, 31 Jan 2005 13:03:39 +0900 (JST) Original-Received: by mctpc71 (Postfix, from userid 31295) id 700BF424; Mon, 31 Jan 2005 13:03:38 +0900 (JST) Original-To: emacs-devel@gnu.org System-Type: i686-pc-linux-gnu Blat: Foop Original-Lines: 31 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: main.gmane.org gmane.emacs.devel:32661 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32661 Is there some trick to using font-lock? I tried the simplest thing I could think of: (progn (font-lock-mode -1) (kill-all-local-variables) (font-lock-add-keywords nil '(("high" . font-lock-keyword-face))) (font-lock-mode t)) on the following text in a buffer: Oh how I love high society. ... and .... no highlighted keywords. What's up? Here's the resulting value of font-lock-keywords: font-lock-keywords's value is (t (("high" . font-lock-keyword-face)) ("high" (0 font-lock-keyword-face))) Local in buffer asdf; global value is nil -Miles -- .Numeric stability is probably not all that important when you're guessing.