From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: outrageous comment syntax Date: 1 Nov 2005 15:36:54 -0800 Organization: http://groups.google.com Message-ID: <1130888214.707028.123130@g14g2000cwa.googlegroups.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1130888562 859 80.91.229.2 (1 Nov 2005 23:42:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2005 23:42:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 02 00:42:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EX5jp-0007BE-Ug for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Nov 2005 00:40:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EX5jp-00049r-CQ for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Nov 2005 18:40:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: 198.74.20.118 Original-X-Trace: posting.google.com 1130888220 32113 127.0.0.1 (1 Nov 2005 23:37:00 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 1 Nov 2005 23:37:00 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 bucket.wellsfargo.com:80 (squid/2.5.STABLE5) Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=198.74.20.118; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:135156 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:30747 Archived-At: Ian Zimmerman wrote: > 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 :-( When you san "cannot be" I assume you mean that use of shy groups (?: ...) is insufficient to your needs? I suggested a generalized fix for problems such as this a couple months ago. I'm not sure how to tell if it was dismissed, or if it's in some state of analysis or even implementation. Basically it involved a seemingly simple change to regexp primatives to accept symbols as well as strings. Accepting a symbol was a compromise to my original suggestion of allowing functions to be passed which apparently introduces problems. The idea is to make regexp handling work more like font-lock. With font-lock routines, anywhere a regexp is legal you can pass a function which is expected to behave like re-search... When I say `behave like' I mean in the way it leaves point, returns t or nil depending on success and setting of match-data. This would give everyone with problems such as this the ability to simply code a custom solution without having to hack up an otherwise useful package that simply needs search results to do it's job.