"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>> "Marcus" == Marcus Harnisch
<marcus.harnisch(a)gmx.net> writes:
Marcus> I just noticed that the variable
Marcus> `before-change-functions' is not buffer-local. However,
Marcus> `after-change-functions' is buffer-local. Does that make
Marcus> sense?
No. Thanks for the report, I'm not sure what makes sense here, but
this doesn't.
In my running instance of 21.4.6, neither of them is buffer-local.
Some evil code must be calling `make-variable-buffer-local' instead of
`make-local-variable'.
Marcus, you could try doing something like this in your `.emacs'[1]:
(lexical-let ((fun (indirect-function 'make-variable-buffer-local)))
(fset 'make-variable-buffer-local
(lambda (variable)
(if (eq variable 'after-change-functions)
(debug "I'm an evil son of a bitch"))
(funcall fun variable))))
Then use XEmacs as you'd usually do. When the offending code gets
evaluated, you should hit the debugger. If the stack trace doesn't
make too much sense, try loading the non-compiled version of the file
in question (e.g. `(load "foo.el")').
After that it should be easy to break its legs or let a professional
do it.
If that doesn't work, something subtler might be going on. But that's
what I'd try first.
[1]
No, I never did learn how to use `defadvice'. Don't try to educate
me, I'm too old and crusty. But I do use `lexical-let' in every
possible opportunity and then some.