[Top][All Lists]

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

Re: C++ mode and c-beginning-of-current-token

From: Herbert Euler
Subject: Re: C++ mode and c-beginning-of-current-token
Date: Sun, 13 May 2007 08:51:52 +0800

> I found some additional strange behaviors.  First, the error in a
> buffer would only be signaled once.  If an error is already signaled,
> typing again does not cause another same error get signaled, but
> font-lock is broken after that.

Font locking is done in an after-change hook.  If a function in the
after-change-hook throws an error, Emacs deletes that function from the
hook, allowing Emacs to continue broken rather than hang up on continual
errors.  I think that is what is happening to you here.  You can check
this by examining after-change-functions before and after the error.

I think this explains all the anomalies you were seeing.

Yes, the reason the error is not signaled again is that the after-change
hook is changed.  I do not know whether it is correct here: all of the
functions in the hook are removed.  The default value of the hook is
(c-after-change jit-lock-after-change auto-composition-after-change t),
and I tried another value (jit-lock-after-change auto-composition-after-change
t c-after-change).  In both cases, `after-change-functions' is nil after
the error has been signaled.

Guanpeng Xu

FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

reply via email to

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