emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: font-lock is broken


From: Bill Wohler
Subject: Re: font-lock is broken
Date: Mon, 10 Oct 2005 11:58:43 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Bill Wohler <address@hidden> writes:

> Bill Wohler <address@hidden> writes:
>
>> Stefan Monnier <address@hidden> writes:
>>
>>>> Make a buffer with this content:
>>>
>>>> In-reply-to: "foo bar" of Fri, 15 Jul 2005 20:31:33 EDT
>>>> --------
>>>
>>>> (2 lines only)
>>>> Then
>>>> M-x mh-letter-mode
>>>> M-x font-lock-fontify-buffer
>>>
>>>> You get:
>>>> font-lock-default-fontify-region: Wrong type argument: number-or-marker-p, 
>>>> nil
>>>
>>> This is introduced by my recent change to font-lock.el which checks that we
>>> do not get stuck in an empty match.  Problem is that it bumps into a minor
>>> bug in mh-font-lock-field-data:
>>>
>>>    (defun mh-font-lock-field-data (limit)
>>>      ...
>>>          (if (and field (mh-letter-skipped-header-field-p field))
>>>              (set-match-data nil)
>>>            (set-match-data (list data-begin data-end data-begin data-end)))
>>>          (goto-char (if (equal point data-end) (1+ data-end) data-end))
>>>          t)))
>>>
>>> As you can see, this function sometimes returns non-nil (i.e. it says it's
>>> found a match) but with no begin/end of match 0.
>>
>> Thanks for pointing this out. That should make it easy for us to fix.
>
> Thanks to Satyaki Das, this has been fixed in the MH-E repository.
>
> It will appear in the Emacs repository in the next week or so when I
> transition the MH-E project to use the Emacs repository as its master.

The transition took longer than I thought, but it is finally complete
and the fix is now checked in.


2005-07-16  Satyaki Das  <address@hidden>

        * mh-comp.el (mh-font-lock-field-data): Fix a bug where the
        function would return t but match-data was being set to nil
        (closes SF #1241017).

-- 
Bill Wohler <address@hidden>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.





reply via email to

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