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

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

Re: font-lock-add-keywords in hi-lock.el


From: Bill Wohler
Subject: Re: font-lock-add-keywords in hi-lock.el
Date: Fri, 30 Dec 2005 15:53:57 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>   signal(error ("Font-lock trying to use keywords before setting them up"))
>>   error("Font-lock trying to use keywords before setting them up")
>>   font-lock-compile-keywords(nil t)
>>   font-lock-fontify-keywords-region(1 81 nil)
>>   font-lock-default-fontify-region(1 80 nil)
>>   font-lock-fontify-region(1 80)
>>   mh-add-sequence-notation(1 t)
>
> So it looks like the problem is that you call font-lock-fontify-region
> without first setting up font-lock variables (e.g. by calling
> font-lock-mode or font-lock-set-defaults).

The manual doesn't mention either font-lock-fontify-buffer or
font-lock-fontify-region. Is that because the manual is incomplete or
because we are using font-lock in an undocumented way?

Nonetheless, if font-lock-default-fontify-buffer calls
font-lock-set-defaults, it seems that font-lock-default-fontify-region
should as well, thereby fixing the problem.

-- 
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]