[Top][All Lists]

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

Re: file modified on opening

From: Kevin Rodgers
Subject: Re: file modified on opening
Date: Wed, 28 Jun 2006 14:55:41 -0600
User-agent: Thunderbird (Windows/20060516)

François Gannaz wrote:
Le mer 28 jun 09:43, Mickey Ferguson a écrit :
I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
php-mode, css-mode, etc.). When I open some files, they are marked as
modifed ("**" in status bar), even if I just view them from Dired. Of
course, the content isn't really modified.
Is there any chance that something that your .emacs is doing is causing
the butter to be modified?  One example I can think of is if you
automatically enter and exit picture-mode.  A buffer that has any
trailing spaces at the end of a line will then be modified by trimming
the trailing spaces.  Now this is only one possible example, but I would
comment out everything in your .emacs, and then add back in, piece by
piece, until you might find a cause that way.

I would suspect that text properties are being added.  Mickey could
find out with `M-: (goto-char (next-property-change (point-min)))'
followed by `C-u C-x ='.

At first, I thought it was this, but I've already narrowed my .emacs to

(require 'mmm-mode)
(setq mmm-global-mode 'maybe)
    :submode php-mode
    :face mmm-code-submode-face
    :front "<\\?\\(php\\)?"
    :back "\\?>")
(add-to-list 'mmm-mode-ext-classes-alist '(html-helper-mode nil fancy-html))

And with such a tiny config, my file is still tagged as modified (at
least with Emacs22, it's OK with Emacs 21). Maybe it's because of
Debian's initialization, but I doubt it.

It's easy enough to check: Start Emacs 22 with the -Q option, then paste
that code into *scratch* and `M-x eval-buffer'.

I tried debugging the wole process, I even learned to use edebug as the plain
backtracing wasn't enough, but I can't find anything for now. I'll try
debugging once again as I can't think of anything better.


reply via email to

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