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: jit-lock doesn't honor font-lock-lines-before Date: Sun, 28 Aug 2005 15:08:59 +0200 Message-ID: <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 1125235092 20150 80.91.229.2 (28 Aug 2005 13:18:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 Aug 2005 13:18:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 28 15:18:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E9N26-0005Yh-QD for ged-emacs-devel@m.gmane.org; Sun, 28 Aug 2005 15:17:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E9N1I-0004Pa-FF for ged-emacs-devel@m.gmane.org; Sun, 28 Aug 2005 09:16:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E9N0f-0004MT-GE for emacs-devel@gnu.org; Sun, 28 Aug 2005 09:15:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E9N0X-0004IO-41 for emacs-devel@gnu.org; Sun, 28 Aug 2005 09:15:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E9N0W-0004HM-2J for emacs-devel@gnu.org; Sun, 28 Aug 2005 09:15:32 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1E9Mx4-0007WA-CS for emacs-devel@gnu.org; Sun, 28 Aug 2005 09:11:58 -0400 Original-Received: (qmail invoked by alias); 28 Aug 2005 13:09:55 -0000 Original-Received: from N797P010.adsl.highway.telekom.at (EHLO [62.47.43.138]) [62.47.43.138] by mail.gmx.net (mp010) with SMTP; 28 Aug 2005 15:09:55 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: emacs-devel 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:42464 Archived-At: The customizable variable `font-lock-lines-before' is not honored by jit-lock mode. That's irritating since jit-lock is turned on by default and other font-lock variables _are_ respected when jit-lock is active. Below find two proposals: (1) Preserve the current state of affairs and provide the appropriate hints in the doc-string: (defcustom font-lock-lines-before 1 "*Number of lines before the changed text to include in refontification. This variable is not considered by `jit-lock-mode' and other Font lock support modes." :type 'integer :group 'font-lock :version "22.1") and the Elisp manual (which doesn't mention jit-lock so far): -- Variable: font-lock-lines-before This variable specifies the number of extra lines to consider when refontifying the buffer after each text change. Font lock begins refontifying from that number of lines before the changed region. The default is 1, but using a larger value can be useful for coping with multi-line patterns. This variable is not considered by `jit-lock-mode' and other Font lock support modes. (2) Modify `jit-lock-after-change' appropriately by, for example, inserting (forward-line (- font-lock-lines-before)) before (setq start (line-beginning-position)) I prefer proposal (1).