Re: Local Variable "mode" ignored ? Could be a bug...

[email protected] Tue, 22 Aug 2006 10:49:15 +0200
Newsgroups gmane.emacs.xemacs.general
Message-ID <OF12325B2C.A929129C-ONC12571D2.00282D6A-C12571D2.00307400@pruftechnik.com>
Hello,

> What worked a long time for me was this footer in each of the .h files:
>=20
> }; // END class someclass
>=20
>=20
> # endif
> // Local Variables:
> // mode: c++
> // End:
> // EOF
>=20
> Today I recognized that the .h files are no longer in c++ mode, but in =
c=20

> mode.

Davit Panariti told me, that putting a form-feed directly before the loca=
l=20
variables will help and it did :) Thanks, Davit!

But this made me curious and I found this in the xemacs documentation:

" The start of the local variables list must be no more than 3000
characters from the end of the file, and must be in the last page if the
file is divided into pages.  Otherwise, Emacs will not notice it is
there."

My local variables are the last lines of the file, so they are surely=20
within 3000 characters from the end of the file. Originally, the files ar=
e=20
not divided into pages, so that shouldn't be an issue, too.

And "enable-local-variables =3D t" is set, as well...
If I run "(lambda nil (interactive) (revert-buffer t t))" in the .h file,=
=20
the mode is changed to c++, so it seems there is some error when the file=
=20
is loaded.

I created a small textfile that contained only the local variables and it=
=20
worked.

So adding a form-feed may solve my problem but this shouldn't be=20
necessary.=20
Any hints ?

TIA
Mit freundlichen Gr=FC=DFen

Markus Grunwald
Softwareentwicklung

PR=DCFTECHNIK Condition Monitoring GmbH
Oskar-Messter-Stra=DFe 19-21
85737 Ismaning
www.pruftechnik.com
Tel: +49 (0)89 99616177
Fax: +49 (0)89 99616200