[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write your own emacs mode

From: Jesper Harder
Subject: Re: write your own emacs mode
Date: Mon, 15 Dec 2003 13:37:34 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Joerg Schuster <address@hidden> 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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]