[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: |
Wed, 22 Oct 2014 01:41:55 +0200 |
Hi Piet,
2014-10-19 19:33 GMT+02:00 Piet van Oostrum <address@hidden>:
> 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)))
Ok, I'll apply this change tomorrow, I can't do that right now.
Thank you,
bye,
Mosè