From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: outrageous comment syntax
Date: Thu, 03 Nov 2005 11:07:22 -0500 [thread overview]
Message-ID: <87y845yayy.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 1130888214.707028.123130@g14g2000cwa.googlegroups.com
>> 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
next prev parent reply other threads:[~2005-11-03 16:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.12863.1130387573.20277.help-gnu-emacs@gnu.org>
2005-11-01 4:29 ` outrageous comment syntax Stefan Monnier
2005-11-01 23:36 ` rgb
2005-11-03 3:50 ` Ian Zimmerman
2005-11-03 16:07 ` Stefan Monnier [this message]
2005-10-27 4:21 Ian Zimmerman
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=87y845yayy.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
/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).