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 14:33:35 -0800

Stefan Monnier <address@hidden> wrote:

> >>>>> Is that enough information to find the culprit, or is there a watch I
> >>>>> can put on the global value of font-lock-keywords which will print a
> >>>>> stacktrace or enter the debugger when it is changed?
> >>>> ...
> >>>> 
> >>>> Before fixing it, it would be useful to know how it gets called.
> >>>> In the buffer list you sent earlier there is the *Occur* buffer.
> >>>> Do you remember on what buffer you called `occur'?  Very likely
> >>>> `occur' forced fontification on a non-font-lock buffer.
> >> 
> >> I've added a sanity check in font-lock-compile-keywords which should at
> >> least catch the offenders before they wreak havoc (hopefully the offenders
> >> are not font-lock itself).
> 
> > This error was not triggered when I visited a folder in MH-E.
> 
> Have you re-dumped Emacs in the mean time.  font-lock is now preloaded.

Nope.

Thanks for the reminder. Dumping...

Running...

  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)
  mh-notate-user-sequences()
  mh-regenerate-headers(("all"))
  mh-scan-folder("+tmp/laptops" "all")
  mh-visit-folder("+tmp/laptops" "all")
  call-interactively(mh-visit-folder)

OK, that's better, thanks! I still need to check the other calls on the
stack, but mh-visit-folder contains this:

  (make-local-variable 'font-lock-defaults)
  (setq font-lock-defaults '(mh-folder-font-lock-keywords t))

Is this the usual way of injecting one's keywords?

Will also RTFM.

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