[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-defaults doesn't work??
From: |
martin rudalics |
Subject: |
Re: font-lock-defaults doesn't work?? |
Date: |
Sun, 15 Apr 2007 09:48:27 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
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?