From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: longlines-mode: font-lock fails (in outline-mode) Date: Tue, 28 Jun 2005 14:46:44 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119985317 12433 80.91.229.2 (28 Jun 2005 19:01:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2005 19:01:57 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 21:01:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DnLJE-0005Zx-U4 for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 20:59:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnLR8-0007CH-GX for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 15:07:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DnLMC-0006Gh-TU for emacs-devel@gnu.org; Tue, 28 Jun 2005 15:02:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DnLLu-00069O-U3 for emacs-devel@gnu.org; Tue, 28 Jun 2005 15:02:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnLLu-00061L-EU for emacs-devel@gnu.org; Tue, 28 Jun 2005 15:02:34 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DnLCZ-0005mC-O0 for emacs-devel@gnu.org; Tue, 28 Jun 2005 14:52:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DnL6a-0004td-HA; Tue, 28 Jun 2005 14:46:44 -0400 Original-To: David Reitter In-reply-to: (message from David Reitter on Mon, 27 Jun 2005 18:11:21 +0100) 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:39804 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39804 Oh, substitute "longlines-mode" for "log". If the above description is not enough to reproduce, do this: M-x outline-mode M-x longlines-mode enter this: *** bla bla bla blu blu blu er er er yeah yeah yeah wow wow wow yup yup yup see here it went black not so good Enter enough text for it to be wrapped around. The first line shown is in purple color, the next line is black, as are the following lines. Because it's still part of the headline, it should be purple as well. outline-mode should look for the hard end of the line, not the 'soft' or wrapped end. Outline-mode specifies a regular expression which ends in `.+'. There is no way in a regexp to specify only hard newlines. But it is possible to call a function instead of using a regexp. I think that makes it possible to do what you want. Is there someone who understands font-lock better than I do who could try to do this? Another idea is to modify regexp matching so that `.' can match a soft newline, when use of hard and soft newlines is enabled. Since that would be done in parts of the code I understand, I could implement it. But what do people think of the idea?