Ralf Angeli wrote:
> * Mosè Giordano (2014-10-19) writes:
>
> > 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?
>
> Actually I'm a bit surprised that the behavior of
> `comment-indent-new-line' is changed in such a way by the value of
> `comment-auto-fill-only-comments'. Especially since the doc string of
> `comment-indent-new-line' does not mention anything about it.
>
> Anyway, setting `comment-auto-fill-only-comments' to nil would work but
> might be a bit strange because it does not seem to be directly related
> to the behavior of `comment-indent-new-line'. An alternative could be to
> call `comment-indent-new-line' only when point is actually in a
> comment. But this will mean more code on our side.
>
> I don't have a clear preference for any solution. Perhaps let-binding
> the variable might currently be the saver alternative.
>
> --
> Ralf
(This is a copy of an earlier message by me that you – Ralf – did not receive
directly)
I think I have found another solution. LaTeX-newline should check if it is
inside a comment and then call indent-new-comment-line, and if not, call
newline.
I propose to replace the
(t
(indent-new-comment-line)))
with
((TeX-in-comment)
(indent-new-comment-line))
(t
(newline)))
--
Piet van Oostrum <[email protected]>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex