Lennart Borgman (gmail) wrote:
I just saw a very strange undo problem. I have no simple way to
reproduce it, but I can frame it a bit. Lock at the backtrace below:
Debugger entered--Lisp error: (wrong-type-argument
number-or-marker-p nil)
rng-error-modified(#<overlay in no buffer> t 777 777 85)
primitive-undo(2 (nil (777 . 862) (t 17963 . 2531)))
undo-more(2)
undo()
call-interactively(undo)
Doesn't it look strange that rng-error-modified (from the nxml-mode
package) is the first thing on the backtrace, before primitive-undo?
I think I am beginning to understand. I found these lines in the
nxml-mode files:
(put 'rng-error 'modification-hooks '(rng-error-modified))
(defun rng-error-modified (overlay after-p beg end
&optional pre-change-len)
And in elisp Info:
`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
It seems like rng-error-modified does not have the correct format for
the new Emacs 22. Is there anyone who knows if this was a change in
Emacs 22?