emacs-devel
[Top][All Lists]
Advanced

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

Re: CC mode 5.31.4: c-{beginning, end}-of-defun try to modify buffer


From: Alan Mackenzie
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
User-agent: Mutt/1.5.9i

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).




reply via email to

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