after-change-functions

after-change-functions is a variable defined in `C source code'.
Its value is
(viper-undo-sentinel)

  • This variable may be risky if used as a file-local variable.

Documentation:
List of functions to call after each text change.
Three arguments are passed to each function: the positions of
the beginning and end of the range of changed text,
and the length in chars 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 chars deleted,
and the post-change beginning and end are at the same place.)

Buffer changes made while executing the `after-change-functions'
don't call any before-change or after-change functions.
That's because `inhibit-modification-hooks' is temporarily set non-nil.

If an unhandled error happens in running these functions,
the variable's value remains nil. That prevents the error
from happening repeatedly and making Emacs nonfunctional.