From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: write your own emacs mode Date: Mon, 15 Dec 2003 13:37:34 +0100 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071492335 18964 80.91.224.253 (15 Dec 2003 12:45:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Dec 2003 12:45:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 15 13:45:32 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AVs6N-0003FB-00 for ; Mon, 15 Dec 2003 13:45:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AVt2V-0006cH-VG for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Dec 2003 08:45:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; 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:15270 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15270 Joerg Schuster writes: > grammar-mode works fine except for one thing: It uses to mark > strings of a certain form as expressions of type X, although I did > not define type X anywhere in the code of grammar-mode. (Example: > Strings that are enclosed in quotes are displayed with > font-lock-string-face. Yet, in the type of files which I use > grammar-mode for, strings of the form '^".*"$' are not wellformed > expressions of any type.) How can I prevent this? This is called syntactic fontification -- as opposed to keyword fontification. You can either turn of syntactic fontification in your mode (this will also inhibit font locking of comments) or modify the syntax table of the mode. > Another question: Is there a (not too complicated) way to replace > the face names like "font-lock-type-face" and so on by more direct > descriptions of the face (e.g. "blue")? I think the cleanest way is to define new faces for the mode with `defface'.