[Top][All Lists]

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

Re: address@hidden: highlight-changes-rotate-faces sets buffer modified

From: Richard Stallman
Subject: Re: address@hidden: highlight-changes-rotate-faces sets buffer modified flag]
Date: Sun, 13 May 2007 13:37:59 -0400

    If the change _is not_ caused by an undo it assigns the text-property
    hilit-chg to the changed text and calls `hilit-chg-fixup' which installs
    the overlays necessary for highlighting the changed text in accordance
    with the just assigned text-property.

    If the change _is_ caused by an undo, `hilit-chg-set-face-on-change'
    falls back on the undo mechanism to restore the hilit-chg
    text-properties and calls `hilit-chg-fixup' as in the non-undo case.

That sounds good.  However, given that, it seems that explicit changes
of the highlighting ought not to mark the buffer as modified.

When these commands are used on an unmodified buffer, perhaps they
should make undo records, but not mark the buffer as modified, and set
up the undo records so that undoing them re-marks the buffer as
unmodified.  That is a strange thing to do, but perhaps it is the least
strange alternative.

      If there were a
    buffer-undo-list entry type which wouldn't set the modified flag ...

You can make an undo entry that will clear it.

reply via email to

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