From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: will we ever have zero width assertions in regexps? Date: Mon, 31 Jan 2011 17:10:11 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1296495653 26614 80.91.229.12 (31 Jan 2011 17:40:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 17:40:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 31 18:40:47 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pjxk2-00030I-60 for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jan 2011 18:40:42 +0100 Original-Received: from localhost ([127.0.0.1]:50526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjxk1-00044V-Lm for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jan 2011 12:40:41 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Injection-Date: Mon, 31 Jan 2011 17:10:11 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="LlLjF8LevGdIZWbTvv+SXA"; logging-data="8882"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ej1K0T3cl08wjkM18tqte" User-Agent: slrn/0.9.8.1pl1 (Linux) Cancel-Lock: sha1:cfyzIw8zDn+YKBwL2RLiDEOwfqA= Original-Xref: usenet.stanford.edu gnu.emacs.help:184727 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:78884 Archived-At: On 2011-01-31, Stefan Monnier wrote: >> match-with-continuation. An interesting idea. I already implemented >> it for Perl (to support (??{}), but it is not exposed to the user. >> Would one want this in non-interactive situations? > > I can't think of interactive uses, but I'd like to try and use it for > to let font-lock find elements that span several lines, even when it > works one-line-at-a-time. So you have a REx which is matched against a line, but you want (in addition to the usual effects of matching) to know whether it "wanted" the match to overflow into the following line? If so, it looks like "reusing the continuation state" would not be a serious optimization - it would add just a small multiplicative constant to the "use only the hypothetical bit" scenario... Do I miss anything? Ilya