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: diary font-lock issue Date: Sun, 21 May 2006 12:39:40 +0200 Message-ID: <4470436C.5010301@gmx.at> References: <8jwtcmqvqm.fsf@fencepost.gnu.org> 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 1148208022 20241 80.91.229.2 (21 May 2006 10:40:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 May 2006 10:40:22 +0000 (UTC) Cc: Glenn Morris , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 21 12:40:19 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 1FhlLu-0001AP-9f for ged-emacs-devel@m.gmane.org; Sun, 21 May 2006 12:40:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhlLt-0004UC-NZ for ged-emacs-devel@m.gmane.org; Sun, 21 May 2006 06:40:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FhlLe-0004QK-0M for emacs-devel@gnu.org; Sun, 21 May 2006 06:39:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FhlLc-0004OT-4L for emacs-devel@gnu.org; Sun, 21 May 2006 06:39:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhlLb-0004O8-Te for emacs-devel@gnu.org; Sun, 21 May 2006 06:39:43 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FhlPL-0000Nb-R8 for emacs-devel@gnu.org; Sun, 21 May 2006 06:43:36 -0400 Original-Received: (qmail invoked by alias); 21 May 2006 10:39:42 -0000 Original-Received: from N705P008.adsl.highway.telekom.at (EHLO [62.47.32.8]) [62.47.32.8] by mail.gmx.net (mp035) with SMTP; 21 May 2006 12:39:42 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: Stefan Monnier 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:54941 Archived-At: > I'd suggest the following 100% untested: > ... > (defun foo-font-lock-fontify-region-function (beg end &optional loudly) > (goto-char beg) > (forward-line 0) > (if (looking-at "=+$") (setq beg (line-beginning-position 0))) > (goto-char end) > (unless (bolp) (forward-line 1)) > (if (looking-at "=+$") (setq end (line-beginning-position 2))) > (font-lock-default-fontify-region beg end loudly)) 100% untested, maybe. 100% elegant, for sure. Would it be very difficult to add this as an example to the "Other Font Lock Variables" section of the Elisp manual?