From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: CC mode 5.31.4: c-{beginning, end}-of-defun try to modify buffer Date: Tue, 8 Jan 2008 20:03:01 +0000 Message-ID: <20080108200301.GA2238@muc.de> References: Reply-To: bug-cc-mode@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199822036 31984 80.91.229.12 (8 Jan 2008 19:53:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2008 19:53:56 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 08 20:54:18 2008 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 1JCKWd-00047N-EX for ged-emacs-devel@m.gmane.org; Tue, 08 Jan 2008 20:54:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCKWG-0007P8-3c for ged-emacs-devel@m.gmane.org; Tue, 08 Jan 2008 14:53:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCKWC-0007Ow-LK for emacs-devel@gnu.org; Tue, 08 Jan 2008 14:53:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCKW8-0007OC-39 for emacs-devel@gnu.org; Tue, 08 Jan 2008 14:53:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCKW7-0007O6-Uz for emacs-devel@gnu.org; Tue, 08 Jan 2008 14:53:44 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JCKW7-00072L-Fy for emacs-devel@gnu.org; Tue, 08 Jan 2008 14:53:43 -0500 Original-Received: (qmail 65503 invoked by uid 3782); 8 Jan 2008 19:53:40 -0000 Original-Received: from acm.muc.de (p57AF462F.dip.t-dialin.net [87.175.70.47]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 08 Jan 2008 20:53:33 +0100 Original-Received: (qmail 2767 invoked by uid 1000); 8 Jan 2008 20:03:02 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:86582 Archived-At: Hi, Andreas! On Tue, Jan 08, 2008 at 06:13:40PM +0100, Andreas Schwab wrote: > c-{beginning,end}-of-defun try to modify the buffer and thus trigger > ask-user-about-supersession-threat. To reproduce load a C file and > touch the underlying file. Then type C-M-e repeatedly. After some > tries you will be asked whether you want to edit the buffer. Ouch! Yes, I can reproduce this. At a guess, it's happening because of CC Mode's extensive use of text properties. I don't (yet) see why it only happens after a several C-M-e's rather than the first. Applying text properties counts as modifying the buffer (I think this is a Bad Thing), and the primitive function which applies the text properties seems to be checking for the file having been modified. Or something like that. As I say, that's just a guess. I'll take a closer look at it sometime. I suspect it is one of these irritating little bugs whose solution demands extensive redesign - here, perhaps, by using overlays/extents instead of text properties. I've added emacs-devel to the CC: Thanks for the report! > Andreas. -- Alan Mackenzie (Nuremberg, Germany).