I understand better now, thank you.
> after-change-major-mode ran to soon. (Maybe we should also print an
> error message in this case, which my current patch does not).
Yes, I think it's more important to signal a clear warning/error than to try
and auto-fix the problem.
BTW, why use "check-" as a prefix (rather than a "-check-" infix or suffix),
thus potentially breaking the usual namespace conventions?
> (I do not know how to do that without setting
> font-lock-defaults to nil.)
Yes, in that case we're screwed either way, which is why we need to signal
a warning/error so someone can fix the problem at its source.
The auto-fix you suggest has the shortcoming I mentioned but is probably the
right "best effort" solution because other solutions probably suffer from
more common/serious problems. Please add some comments explaining how this
code is only used to double check erroneous situations and to try and
salvage such "desperate" cases (the presence of a warning/error should
already make the code more understandable).
Stefan
PS: By warning/error I'm not sure what I mean, but it should be more
obnoxious than a (message "foo") and less than (error "foo").
Probably something like (progn (message "foo") (ding) (sit-for 1)).
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel