I haven't actually looked at that yet. But where, with respect to
setting the major mode, does the outshine function look at
comment-start?
Were you doing anything involving changing the major mode at the time?
(See below.)
Thanks for taking the trouble to create this minimal test code. It
makes it so much easier to understand when people do this. :-)
OK. Have a look at the *Messages* buffer. You will see the messages
come in pairs: (I actually did this in a C Mode buffer.)
`comment-start' = `/* '
`comment-start' is undefined, it's value is: `nil'
But in the echo area, you will only see the second one.
> I have tested this only for comment-start. But I suspect this might affect
> buffer local vars in general?
I think so, too. When you visit a buffer, Emacs calls `normal-mode' to
determine and set the major mode. The first thing `normal-mode' does is
to call `fundamental-mode'. This invokes `change-major-mode-hook',
which outputs the first "comment-start" message. Then
`fundamental-mode' kills all local variables, including `comment-start'.
`normal-mode' then determines the correct major mode, and calls it.
This invokes `change-major-mode-hook' again, which outputs the second
"comment-start" message with the `nil'. The major mode is then fully
set up, including giving a value to `comment-start'.
So, this code seems to be working the way it's intended to.
What is
outshine doing that triggers a problem in this area?
Is it doing things
with the `change-major-mode-hook' that involve using `comment-start'?
Maybe this is the problem.
--
Kaushal Modi