help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: font-lock-defaults doesn't work??


From: Peter Tury
Subject: Re: font-lock-defaults doesn't work??
Date: 14 Apr 2007 03:13:28 -0700
User-agent: G2/1.0

Tim X:
> You are also re-inventing a wheel to some extent. Use define-derived-mode

If I remember well, define-derived-mode is for very simple new major
modes what practically doesn't do more than fontification, new key
bindings and so. However, I plan to add (much?) more staff later. What
I sent above is the minimal extract from the current code what can be
used to check if it works in the same way for you, than for me.

Have you tried it? Does it work well for you even without the
"secretly must-to-have parts"? Anyway it looks strange for me if
fontification works (almost) well, but syntax parsing doesn't -- I
think they should be in sync. in any (normal) cases...

> from memory, I don't htink this bit is correct and you shouldn't need it. See
> the example on the eamcs wiki. Comment font locking is driven by the comment
> characters defined in the syntax table. You shouldn't need to also set them
> explicitly in the font-lock stuff.

I thought the other way (according to emacs help, what I showed
previously): I planned to use _only_ font-lock-defaults and thought it
sets the syntax table for me. I need syntax properties as well anyway,
so I don't plan to deal too much with the syntax-table: only comment
delimiters seems to be in the right place there in my case...

> have a look at a fairly simple mode and see how they do the font-lock stuff.

Yes, I searched for "official" settings in my elisp directory, but I
afraid all of what I checked are old, so maybe they don't use new(?)
possibilities. Thus I tried what I could understand from the actual
emacs documentation...

> I found sql.el quite useful (part of emacs). Again, look at the emacs wikki,
> there is some really useful ifo there.

I'll check sql.el also, thanks for the tip. What emacswiki page you
think?

\bye
P



reply via email to

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