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: jit-lock doesn't honor font-lock-lines-before Date: Tue, 30 Aug 2005 08:54:13 +0200 Message-ID: <43140295.4000102@gmx.at> References: <4311B76B.1050406@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1125392325 10777 80.91.229.2 (30 Aug 2005 08:58:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2005 08:58:45 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 30 10:58:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EA1vk-0002Do-9A for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2005 10:57:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EA1zj-00021t-7q for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2005 05:01:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EA1SN-0007BQ-Mo for emacs-devel@gnu.org; Tue, 30 Aug 2005 04:26:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EA1SK-0007Aj-Ip for emacs-devel@gnu.org; Tue, 30 Aug 2005 04:26:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EA1P1-0006YG-KK for emacs-devel@gnu.org; Tue, 30 Aug 2005 04:23:31 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1EA11g-0000Sl-9w for emacs-devel@gnu.org; Tue, 30 Aug 2005 03:59:24 -0400 Original-Received: (qmail invoked by alias); 30 Aug 2005 07:50:18 -0000 Original-Received: from N723P008.adsl.highway.telekom.at (EHLO [62.47.34.72]) [62.47.34.72] by mail.gmx.net (mp019) with SMTP; 30 Aug 2005 09:50:18 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: rms@gnu.org In-Reply-To: X-Y-GMX-Trusted: 0 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:42496 Archived-At: > (2) Modify `jit-lock-after-change' appropriately by, for example, inserting > > (forward-line (- font-lock-lines-before)) > > before > > (setq start (line-beginning-position)) > > That seems like the right fix. Why do you think it isn't? > > Because this means that every time I insert one character, redisplay would refontify `font-lock-lines-before' in addition to the current line. I suppose that the impact of this variable has not been noticed so far because jit-lock doesn't consider it. On the other hand, jit-lock wouldn't be able to handle this variable in the same way as font-lock does: font-lock refontifies immediately in the after-change hook. jit-lock's after-change hook would only reset the fontified property to nil. Whether and when these lines are refontified would be _also_ decided by the redisplay engine. And the latter doesn't know about `font-lock-lines-before'. For example, editing the first line in a window would not "include the line before in refontification".