[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange undo problem
From: |
Johan Bockgård |
Subject: |
Re: Strange undo problem |
Date: |
Sun, 22 Apr 2007 14:01:45 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) |
"Lennart Borgman (gmail)" <address@hidden> writes:
> And in elisp Info:
That is, (info "(elisp)Special Properties")
> `modification-hooks'
> If a character has the property `modification-hooks', then its
> value should be a list of functions; modifying that character
> calls all of those functions. Each function receives two
> arguments: the beginning and end of the part of the buffer being
> modified. Note that if a particular modification hook function
Wrong section. Try (info "(elisp)Overlay Properties")
`modification-hooks'
This property's value is a list of functions to be called if
any character within the overlay is changed or if text is
inserted strictly within the overlay.
The hook functions are called both before and after each
change. If the functions save the information they receive,
and compare notes between calls, they can determine exactly
what change has been made in the buffer text.
When called before a change, each function receives four
arguments: the overlay, `nil', and the beginning and end of
the text range to be modified.
When called after a change, each function receives five
arguments: the overlay, `t', the beginning and end of the
text range just modified, and the length of the pre-change
text replaced by that range. (For an insertion, the
pre-change length is zero; for a deletion, that length is the
number of characters deleted, and the post-change beginning
and end are equal.)
If these functions modify the buffer, they should bind
`inhibit-modification-hooks' to `t' around doing so, to avoid
confusing the internal mechanism that calls these hooks.
--
Johan Bockgård
Re: Strange undo problem,
Johan Bockgård <=