From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: regexp does not work as documented Date: Sun, 11 May 2008 09:40:51 +0200 Message-ID: <4826A303.3030002@gmx.at> References: <87k5i8ukq8.fsf@stupidchicken.com> <200805061335.11379.bruno@clisp.org> <48204B3D.6000500@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1210492325 15411 80.91.229.12 (11 May 2008 07:52:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 May 2008 07:52:05 +0000 (UTC) Cc: Chong Yidong , 192@emacsbugs.donarmstrong.com, Bruno Haible , emacs-devel@gnu.org To: David Koppelman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 11 09:52:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jv6MJ-00005v-LX for ged-emacs-devel@m.gmane.org; Sun, 11 May 2008 09:52:39 +0200 Original-Received: from localhost ([127.0.0.1]:34693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jv6La-0008Du-GR for ged-emacs-devel@m.gmane.org; Sun, 11 May 2008 03:51:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jv6LR-0008Cz-BX for emacs-devel@gnu.org; Sun, 11 May 2008 03:51:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jv6LM-0008Bk-7u for emacs-devel@gnu.org; Sun, 11 May 2008 03:51:44 -0400 Original-Received: from [199.232.76.173] (port=56247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jv6LM-0008Bh-3H for emacs-devel@gnu.org; Sun, 11 May 2008 03:51:40 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:48962) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Jv6LL-0001Dx-Mt for emacs-devel@gnu.org; Sun, 11 May 2008 03:51:40 -0400 Original-Received: (qmail invoked by alias); 11 May 2008 07:51:37 -0000 Original-Received: from 62-47-54-236.adsl.highway.telekom.at (EHLO [62.47.54.236]) [62.47.54.236] by mail.gmx.net (mp009) with SMTP; 11 May 2008 09:51:37 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/M86d9vM3MXw7/M9IHRmbR1f3AF9VIIiYJzNfGw9 uwHW00ggCpiGAW User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96962 Archived-At: > First I'll work on the hi-lock warning as I described below, then I'll > see about detecting and doing something helpful for additional > situations where multi-line won't work. Think of the following pathological case: Devise a regexp to highlight the first line of a buffer provided the buffer does not end with a newline. Doing this with `font-lock-multiline' hardly makes any sense. Maybe users should classify whether a regexp they use (1) doesn't match newlines - no `font-lock-multiline' needed, (2) match at most n newlines in which case you should tell font-lock to rescan from n lines before each buffer change (with large n the display engine will suffer noticeably, mainly because font-lock has to search for all other keywords as well), or (3) may match more than n newlines in which case you should use an idle timer to scan the entire buffer for any matches of such regexps and highlight them separately.