A colleague using a class I wrote reports
that AUCTeX is inserting guillemets when he hits the double-quote key. Investigation showed that
TeX-language-fr-hook is being called even though the document itself is not in French.
If I understand a comment from @egreg in response to my colleague's question (Double-quote produces guillemets in emacs)
the reason AUCTeX thinks the comment is in French might be something like
In fact there is this code in the class:
This conditional branch is only triggered if the
french option to our class is chosen by the user. It seems that AUCTeX is taking that line to mean that the document is in French, regardless. How can I arrange it so the
\usepackage is hidden from AUCTeX or only has an effect when it's intended to?
For full context see Double-quote produces guillemets in emacs
Edit: Below are a few lines from the
*Messages* buffer in emacs that may be useful in tracing the problem:
Loading /var/lib/auctex/emacs24/msp.elc...done Loading /usr/share/emacs/site-lisp/auctex/style/babel.el (source)...done Loading /var/lib/auctex/emacs24/francais.elc...done Loading /usr/share/emacs/site-lisp/auctex/style/francais.el (source)...done Loading /usr/share/emacs/site-lisp/auctex/style/frenchb.el (source)...done Loading /var/lib/auctex/emacs24/english.elc...done