From: martin rudalics <rudalics@gmx.at>
To: tury.peter@gmail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: font-lock-defaults doesn't work??
Date: Sun, 15 Apr 2007 09:48:27 +0200 [thread overview]
Message-ID: <4621D8CB.5030905@gmx.at> (raw)
The problem is that for `t-syntax-table' you use `make-syntax-table'
which inherits from `standard-syntax-table' (the one used for
Fundamental mode) since you don't specify an OLDTABLE argument.
`font-lock-set-defaults' first uses `copy-syntax-table' with the value
returned by `syntax-table' as argument (which could be
`emacs-lisp-mode-syntax-table' since you encounter problems with
semicolons) and then applies the modifications you provided.
But when you define t-mode you eventually have to think about other
things as well - moving around in that buffer, parsing, skipping
comments, ... Hence you eventually need t-syntax-table with the
comment-syntax you define anyway for buffers in t-mode. What's wrong
with providing that syntax-table as the current one to font-locking?
next reply other threads:[~2007-04-15 7:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-15 7:48 martin rudalics [this message]
-- strict thread matches above, loose matches on Subject: below --
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4621D8CB.5030905@gmx.at \
--to=rudalics@gmx.at \
--cc=help-gnu-emacs@gnu.org \
--cc=tury.peter@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).