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: Re: `font-lock-extend-region-functions' vs. `font-lock-extend-after-change-region-function' Date: Tue, 28 Apr 2009 22:45:37 +0200 Message-ID: <87ljpkld72.fsf@freebits.de> References: <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 1240951577 10436 80.91.229.12 (28 Apr 2009 20:46:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2009 20:46:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 28 22:46:08 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 1LyuBp-0008EB-6L for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2009 22:46:05 +0200 Original-Received: from localhost ([127.0.0.1]:48942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyuBo-00049e-Oc for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2009 16:46:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LyuBj-00049Z-Cs for emacs-devel@gnu.org; Tue, 28 Apr 2009 16:45:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LyuBd-00047q-RS for emacs-devel@gnu.org; Tue, 28 Apr 2009 16:45:57 -0400 Original-Received: from [199.232.76.173] (port=39986 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyuBd-00047n-MO for emacs-devel@gnu.org; Tue, 28 Apr 2009 16:45:53 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:47278 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 1LyuBd-0007X2-5X for emacs-devel@gnu.org; Tue, 28 Apr 2009 16:45:53 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LyuBY-0006hq-Ch for emacs-devel@gnu.org; Tue, 28 Apr 2009 20:45:48 +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 20:45:48 +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 20:45:48 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 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:02RzFs+jgvmtAG3NsS6jsi7nb00= 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:110526 Archived-At: Stefan Monnier writes: > > 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? > > Have you read the Elisp manual's discussion about font-locking > multiline elements? No, I somehow missed that section. Of course, it's all in there! (blush) > The "right" answer is usually font-lock-extend-region-functions, but > it's hard to tell without knowing anything more (sometimes it's > difficult/impossible to write the necessary > font-lock-extend-region-functions). > > > 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. > > Yes, that's normal. That's what font-lock-extend-region-functions is for. Right, works like a charm now. Thank you very much for your prompt answer!, -T.