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: Mon, 16 Apr 2007 12:07:20 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (windows-nt)

Hi,

thanks for all of you for the valuable and really helpful answers!!

Now I see I basically confused two things: font-lock-syntax-table and
(major mode's) syntax-table are not necessarily the same --> thus it
can easily happen that fontification (based on font-lock-syntax-table)
and syntax parsing (based on syntax-table) works (in)correctly
independently from each other. In my problematic example I set
font-lock-syntax-table well, but missed the set of syntax-table (since
I thought it is automatic). Now I understand the normal way (in my
case) is the opposite one (what was suggested by you): setting
syntax-table well, and let font-lock-defaults to inherit it (by using
`nil' in its definition). I tried and saw it works perfectly now.

Also thanks for the explanation of the details behind the wrong
functionality of my wrong code! (I was misled by the info sentence (in
35.3 Syntax Table Funtions > make-syntax-table): "This function creates
a new syntax table, with all values initialized to `nil'." The
following sentences were not clear enough for me...)

And yes, it seems I confused define-derived-mode and
define-generic-mode -- so I'll check -derived-mode and the wiki pages
also!

\bye
P





reply via email to

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