From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: outrageous comment syntax Date: Thu, 03 Nov 2005 11:07:22 -0500 Organization: Bell Sympatico Message-ID: <87y845yayy.fsf-monnier+gnu.emacs.help@gnu.org> References: <1130888214.707028.123130@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131034756 26072 80.91.229.2 (3 Nov 2005 16:19:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Nov 2005 16:19:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 03 17:19:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EXhh7-0002MW-BI for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Nov 2005 17:12:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXhh5-0005gk-5z for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Nov 2005 11:12:03 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:qAgyu7dSx2OUpvi/R1pQ/78sXRo= Original-Lines: 26 Original-NNTP-Posting-Host: 65.92.243.185 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1131034045 65.92.243.185 (Thu, 03 Nov 2005 11:07:25 EST) Original-NNTP-Posting-Date: Thu, 03 Nov 2005 11:07:25 EST Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!mpls-transit-01.news.qwest.net!207.225.159.1.MISMATCH!feed.news.qwest.net!tor-nx1!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:135192 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30784 Archived-At: >> 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