Hey emacs-devel, I'm using overlays to keep track of buffer regions that have been sent to a subprocess. Edits in a previously sent ("processed") region are generally forbidden — the only two permissible kinds of changes in processed regions are editing a comment and adding or removing of space at the end of a line. Adding a modification-hook to my overlays makes it easy to disallow changes (by raising an error), and to allow changes when in a comment. I can't find a good way to allow whitespace edits at the end of a line, though. I can detect such changes from the second call to the modification hook (during which it's easy to know whether the change is only adding or removing space at the end of a line), but I can't easily undo the changes and error out if they involve more than whitespace, can I? What's the right way do disallow certain modifications in text covered by an overlay, in particular when the determination of whether to allow a given modification cannot be made during the first call to the overlay's modification hook? For example, how can I make an overlay that allows insertion or deletion of space at the end of the lines that it covers, but no other modifications? Thanks! Clément.