From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tobias C. Rittweiler" Newsgroups: gmane.emacs.devel Subject: `font-lock-extend-region-functions' vs. `font-lock-extend-after-change-region-function' Date: Tue, 28 Apr 2009 17:34:42 +0200 Message-ID: <87prewlrl9.fsf@freebits.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1240932918 8329 80.91.229.12 (28 Apr 2009 15:35:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2009 15:35:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 28 17:35:09 2009 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 1LypKu-0005G1-Nd for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2009 17:35:09 +0200 Original-Received: from localhost ([127.0.0.1]:56443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LypKt-0001qq-Qz for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2009 11:35:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LypKp-0001qf-Jj for emacs-devel@gnu.org; Tue, 28 Apr 2009 11:35:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LypKl-0001og-67 for emacs-devel@gnu.org; Tue, 28 Apr 2009 11:35:03 -0400 Original-Received: from [199.232.76.173] (port=38673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LypKk-0001od-Ub for emacs-devel@gnu.org; Tue, 28 Apr 2009 11:34:58 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:48506 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LypKk-0004bE-Bw for emacs-devel@gnu.org; Tue, 28 Apr 2009 11:34:58 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LypKg-0000mF-1W for emacs-devel@gnu.org; Tue, 28 Apr 2009 15:34:54 +0000 Original-Received: from host145.natpool.mwn.de ([138.246.7.145]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Apr 2009 15:34:54 +0000 Original-Received: from tcr by host145.natpool.mwn.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Apr 2009 15:34:54 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host145.natpool.mwn.de User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:6lT15Gkyyjehj+8x1SiRjMNNHaQ= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:110517 Archived-At: Hi, what is the difference between the variables `font-lock-extend-region-functions' and `font-lock-extend-after-change-region-function' ? In particular, how do they relate? Which should be used for what? >From a major-mode writer's point of view. I face the following problem: Font-lock, perhaps just jit-lock (I'm using that), calls `font-lock-fontify-region-function' with start and end values pretty much arbitrary in the buffer. That breaks the following: I have a MATCHER function on `font-lock-keywords' which on some occasions has to to match beyond the limit it's called with. In that case it declines, but that results in font-lock skipping over that region and going to the next. If it doesn't decline, and returns match data for the whole thing (beyond the limit), only up to the limit will in fact be fontified. What should be done in this case? I thought about specifying a function for `font-lock-extend-region-functions' which extends the end to the end of the current defun. -T.