[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: outrageous comment syntax
From: |
Stefan Monnier |
Subject: |
Re: outrageous comment syntax |
Date: |
Thu, 03 Nov 2005 11:07:22 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> comment-start-skip's value is
>> "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *"
>> Local in buffer simple-haskell.el; global value is nil
>>
>> Documentation:
>> *Regexp to match the start of a comment plus everything up to its body.
>> If there are any \(...\) pairs, the comment delimiter text is held to begin
>> at the place matched by the close of the first pair.
>>
>>
>> However, I have a language with two comment syntaxes, one of which
>> depends on leading context and the other doesn't. How in the world can
>> I set this variable properly? The context must be within the first
>> group, and it cannot be :-(
Since you haven't provided any hard data, I'll give you a sample solution to
another problem:
(set (make-local-variable 'comment-start-skip)
"#+[ \t]*\\|\\(uglyprefix +\\)--+[ \t]*")
Now maybe you problem can't be solved in the same way, of course.
The group-1 convention doesn't cover all cases.
Stefan