[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer is modified after commit
From: |
martin rudalics |
Subject: |
Re: buffer is modified after commit |
Date: |
Thu, 14 Feb 2008 08:53:40 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> edit
> save
> rotate
> edit
> save
> undo undo undo...
Maybe define
(defun restore-buffer-unmodified-unless-saved (arg)
(when (or (and (not (buffer-file-name)) (not arg))
(and (file-exists-p (buffer-file-name))
(equal arg (nth 5 (file-attributes (buffer-file-name))))))
(restore-buffer-modified nil)))
and add
(setq buffer-undo-list
(cons '(apply restore-buffer-unmodified-unless-saved
(when (and (buffer-file-name)
(file-exists-p (buffer-file-name)))
(nth 5 (file-attributes (buffer-file-name)))))
buffer-undo-list))
to `highlight-changes-rotate-faces', but that would constitute yet
another ugly hack.
What's really needed is a new entry type for `buffer-undo-list' like the
(nil PROPERTY VALUE BEG . END) one but when applied not causing a change
in the buffer-modified status.
> By the way, I've installed a change on the 22 branch which should fix
> the buffer-modified-p problem (and removes this number 3 hack).
Thanks.
- buffer is modified after commit, Juanma Barranquero, 2008/02/05
- Re: buffer is modified after commit, Juanma Barranquero, 2008/02/13
- Re: buffer is modified after commit, martin rudalics, 2008/02/13
- Re: buffer is modified after commit, Stefan Monnier, 2008/02/13
- Re: buffer is modified after commit, martin rudalics, 2008/02/13
- Re: buffer is modified after commit, Stefan Monnier, 2008/02/13
- Re: buffer is modified after commit, Juanma Barranquero, 2008/02/13
- Re: buffer is modified after commit,
martin rudalics <=
- Re: buffer is modified after commit, Stefan Monnier, 2008/02/14
- Re: buffer is modified after commit, martin rudalics, 2008/02/14