Vadim Zaliva <[email protected]> writes:
> If I have buffer like this:
>
> Foo \cite{bar} bar.
>
> And press `M-q` I get error:
>
> LaTeX-indent-calculate-last: Wrong type argument: stringp, nil
> [...]
> Major mode: LaTeX
It seems you're running AUCTeX as major-mode and not the builtin one.
Which version of AUCTeX are you using and how did you install it?
At any rate, I can't reproduce what you describe with this small file:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{document}
Foo \cite{bar} bar.! Point here hitting M-q
\end{document}
%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---
Can you come up with a recipe to reproduce with:
• Start Emacs with 'emacs -Q'
• Activate AUCTeX by eval'ing this in scratch (presuming you've
installed AUCTeX from ELPA):
(progn
(setq debug-on-error t)
(package-initialize t)
(package-activate 'auctex))
• In the file above (or any other example), tell us exactly where to put
the cursor before hitting 'M-q'
• Show what the debugger says in your case.
Best, Arash