[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: |
Sun, 19 Oct 2014 18:15:03 +0200 |
Hi Ralf,
2014-10-19 16:19 GMT+02:00 Ralf Angeli <address@hidden>:
> * Mosč Giordano (2014-10-18) writes:
>
>> 2014-10-18 10:53 GMT+02:00 Piet van Oostrum <address@hidden>:
>>>
>>> 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?
>
> The change would indeed defeat the purpose of `LaTeX-newline'. If
> `LaTeX-insert-into-comments' is t, the function makes sure that
> inserting a line break in a comment will insert a comment starter in the
> new line. You can test this with the following line in a LaTeX
> document:
>
> % foo-!-
>
> The -!- marks the cursor position. If you call `LaTeX-newline' here,
> you will get the following result:
>
> % foo
> % -!-
>
> With the proposed change you'd get this:
>
> % foo
> -!-
Thank you. I've just noticed also insertion of other environments,
like itemize, gives weird results when
`comment-auto-fill-only-comments' is non-nil. Does it make sense to
let-bind this variable to nil when calling `indent-new-comment-line'
in the line referenced by Piet?
Bye,
Mosè