From: Peter Tury <peter.tury@nokia.com>
To: help-gnu-emacs@gnu.org
Subject: Re: font-lock-defaults doesn't work??
Date: Mon, 16 Apr 2007 12:07:20 +0200 [thread overview]
Message-ID: <uy7ksk4yv.fsf@nokia.com> (raw)
In-Reply-To: 1176478548.918147.146490@d57g2000hsg.googlegroups.com
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
next prev parent reply other threads:[~2007-04-16 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-13 15:35 font-lock-defaults doesn't work?? Peter Tury
2007-04-14 9:42 ` Tim X
2007-04-14 10:13 ` Peter Tury
2007-04-14 10:47 ` Lennart Borgman (gmail)
2007-04-15 3:54 ` Tim X
2007-04-16 10:07 ` Peter Tury [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-15 7:48 martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uy7ksk4yv.fsf@nokia.com \
--to=peter.tury@nokia.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.