From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: C++ mode and c-beginning-of-current-token Date: Sun, 13 May 2007 08:51:52 +0800 Message-ID: References: <20070512201204.GA1978@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1179017533 4388 80.91.229.12 (13 May 2007 00:52:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 May 2007 00:52:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: acm@muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 13 02:52:11 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hn2Jm-0005tc-0o for ged-emacs-devel@m.gmane.org; Sun, 13 May 2007 02:52:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hn2RL-00061H-7E for ged-emacs-devel@m.gmane.org; Sat, 12 May 2007 20:59:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hn2RI-00060q-Af for emacs-devel@gnu.org; Sat, 12 May 2007 20:59:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hn2RG-00060W-Jm for emacs-devel@gnu.org; Sat, 12 May 2007 20:59:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hn2RG-00060T-E3 for emacs-devel@gnu.org; Sat, 12 May 2007 20:59:54 -0400 Original-Received: from bay0-omc1-s7.bay0.hotmail.com ([65.54.246.79]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hn2Je-0001Ln-AC for emacs-devel@gnu.org; Sat, 12 May 2007 20:52:02 -0400 Original-Received: from hotmail.com ([65.55.154.88]) by bay0-omc1-s7.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 12 May 2007 17:51:53 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 12 May 2007 17:51:53 -0700 Original-Received: from 65.55.154.123 by by143fd.bay143.hotmail.msn.com with HTTP; Sun, 13 May 2007 00:51:52 GMT X-Originating-IP: [221.223.220.175] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <20070512201204.GA1978@muc.de> X-OriginalArrivalTime: 13 May 2007 00:51:53.0641 (UTC) FILETIME=[E616E990:01C794F8] X-detected-kernel: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70938 Archived-At: > > 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. Regards, Guanpeng Xu _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/