[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.87; LaTeX-newline doesn't insert newline when commen
From: |
Mosè Giordano |
Subject: |
Re: [Bug-AUCTeX] 11.87; LaTeX-newline doesn't insert newline when comment-auto-fill-only-comments is set |
Date: |
Sat, 18 Oct 2014 13:35:28 +0200 |
Hi Piet,
2014-10-18 10:53 GMT+02:00 Piet van Oostrum <address@hidden>:
>
> This bug shows up when I start a new document and enter C-e C-e document
> Iinsert document environment. The document shows up as follows:
>
> \begin{document}
>
> \end{document}
> \documentclass{article}
>
> I.e the documentclass comes at the end. I traced this to LaTeX-newline not
> inserting newlines, and this only happens when both
> LaTeX-insert-into-comments and comment-auto-fill-only-comments are TRUE.
> The reason is that LaTeX calls (indent-new-comment-line) even when not in a
> comment, but indent-new-comment-line doesn't do anything in this case. It
> says:
>
> ;; If we are not inside a comment and we only auto-fill comments,
> ;; don't do anything (unless no comment syntax is defined).
>
> The problem can be solved by changing the last cond part in LaTeX-newline
> from
>
> (t
> (indent-new-comment-line)))
> to
> (t
> (newline)))
>
Thanks for the report! I can reproduce the bug and your change does
indeed fix it, but I'm wondering whether applying it would cause side
effects in other places, e.g. dtx files. Ralf, you wrote this
function, what do you think?
Bye,
Mosè