[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define multi-line comments
From: |
henry atting |
Subject: |
Re: define multi-line comments |
Date: |
Sun, 22 Jun 2008 17:43:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
David Hansen wrote:
> On Sun, 22 Jun 2008 09:51:02 +0200 henry atting wrote:
> [...]
>>
>> Because its only purpose is to highlight direct speech (in my
>> text-mode) it actually works very well.
>
> Are you talking about setting `font-lock-multiline' to `t' and just
> using regexps that may spawn several lines? If it works for you just
> use it, it will save a lot of trouble. But be warned, it's not 100%
> accurate.
With `lazy-lock-mode' it works fine. I can use it all the more it has
not to be 100% reliable.
>> Mmh, with `font-lock-syntactic-keywords' I couldn't get very far. I
>> found this in the manual:
>
> If you describe your problems in a bit more detail someone might be able
> to help.
Much more out of curiosity (or to learn a little) I took the following
example from an old php mode library:
(defconst mytext-font-lock-syntactic-keywords
(list
'("\\(\%\\)"
(1 (11 . nil)))
'("%.*\\([\n]\\)"
(1 (12 . nil)))
))
I expected it to start a comment with `%' and end it on a new line
with `%' But it doesn't work this way.
So as a result of my poor understanding of elisp it may be complete
nonsense.
henry