From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: diary font-lock issue Date: Wed, 17 May 2006 11:11:13 -0400 Message-ID: References: <8jwtcmqvqm.fsf@fencepost.gnu.org> <4469F4AE.8030909@gmx.at> <1hac9hn99k.fsf@fencepost.gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147879129 2611 80.91.229.2 (17 May 2006 15:18:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 May 2006 15:18:49 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 17 17:18:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FgNhy-000877-DY for ged-emacs-devel@m.gmane.org; Wed, 17 May 2006 17:13:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgNhx-0006dZ-9W for ged-emacs-devel@m.gmane.org; Wed, 17 May 2006 11:13:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgNgh-0005zn-H8 for emacs-devel@gnu.org; Wed, 17 May 2006 11:11:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgNgb-0005tf-5t for emacs-devel@gnu.org; Wed, 17 May 2006 11:11:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgNgZ-0005sY-CX for emacs-devel@gnu.org; Wed, 17 May 2006 11:11:39 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgNjI-0001lm-Sf; Wed, 17 May 2006 11:14:29 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id D93502CF441; Wed, 17 May 2006 11:11:28 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CE0A8452A; Wed, 17 May 2006 11:11:13 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id B8DF96C80F; Wed, 17 May 2006 11:11:13 -0400 (EDT) Original-To: Glenn Morris In-Reply-To: <1hac9hn99k.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 16 May 2006 13:56:39 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca 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:54634 Archived-At: > This all seems very complex. According to: > > "the font-lock-multiline property should be enough in all cases to > make it unnecessary to use an after-change-function hook." That's true. His after-change-function is not needed. > That's a long thread, but AFAICS, it seems that for simple keyword > fontification, setting font-lock-multiline for the buffer ought to be > enough. No. font-lock-multiline (just like after-change-functions) only help with the re-fontification of multiline keywords. The problem you're facing is the one of initial detection of a multiline keyword. > (Indeed, the fancy diary buffer is not something one edits, so this is > about as simple as multiline font-lockign can get.) Actually the initial detection of multiline keywords is the hard part, not the re-fontification after a buffer change. Note that a workaround for your problem is to turn off jit-lock (you can do so buffer-locally by setting font-lock-support-mode to nil). Stefan