emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diary font-lock issue


From: Stefan Monnier
Subject: Re: diary font-lock issue
Date: Wed, 17 May 2006 17:15:27 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> (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))

> One thing I don't get about this - it looks like I can't rely on
> font-lock regions beginning/ending at the start of lines.

You can't rely on it in font-lock-fontify-region-function, because the
round-up-to-whole-lines is done in font-lock-default-fontify-region.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]