I have a problem with AUCTeX loading the correct hooks with a Beamer file.

If my file contains line breaks in the documentclass line, the style hooks are not loaded. (Thus I have no frames in my AUCTeX environments, and other commands are also unavailable.) For instance:

  handout, % no transitions

But if there are indeed no breaks, the style hooks are correctly loaded. For instance:


Note that both ways are correct in LaTeX, but the first one enhances readability.

Is there a way to fix this?

  • Did you mean that the former enhances readability?
    – giordano
    Feb 19, 2016 at 15:36

1 Answer 1


The regexp matching \documentclass commands is contained in LaTeX-auto-minimal-regexp-list. It does accept breaks withing optional arguments, but it expects the closing square bracket be followed by the opening curly bracket. You can either write

  handout, % no transitions

in your document or change the regexp in order to accept a newline after the closing square bracket. I think the former is easier to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.