[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock is broken
From: |
Stefan Monnier |
Subject: |
Re: font-lock is broken |
Date: |
Mon, 18 Jul 2005 17:17:16 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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.
I'm tempted to just revert my patch, since it causes constant run-time
checks and trips up some pre-existing code, only in the hope of occasionally
working around some bugs that would need to be fixed anyway.
Stefan
- font-lock is broken, Michael Kifer, 2005/07/15
- Re: font-lock is broken,
Stefan Monnier <=
- Re: font-lock is broken, Richard M. Stallman, 2005/07/19
- Re: font-lock is broken, Stefan Monnier, 2005/07/19
- Re: font-lock is broken, Richard M. Stallman, 2005/07/22
- Re: font-lock is broken, Stefan Monnier, 2005/07/22
- Re: font-lock is broken, Richard M. Stallman, 2005/07/23
- Re: font-lock is broken, Stefan Monnier, 2005/07/23
- Re: font-lock is broken, Richard M. Stallman, 2005/07/24
Re: font-lock is broken, Bill Wohler, 2005/07/19