[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5595: Commenting in F90

From: Glenn Morris
Subject: bug#5595: Commenting in F90
Date: Fri, 19 Feb 2010 04:12:14 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

retitle 5595 comment-indent-new-line in f90-mode

Angelo Graziosi wrote:

> C-x C-f foo.f90
> Type '!' (it is at line 1, column 0 in Emacs).
> Then continue to comment: C-M-j. The new '!' is at line 2, column 2
> and not at line 2, column 0, i.e. below the previous '!', as one
> expects (at least me!). In other word the second '!' is indended.

C-M-j runs comment-indent-new-line, a function which I do not understand. 
Maybe it's doing what it is supposed to do.

The only way to customize the behaviour of this function is through
standard comment variables. As far as I know these are all set
correctly in f90-mode.

The doc-string says

    Break line at point and indent, continuing comment if within one.
    This indents the body of the continued comment
    under the previous comment line.

It's a little ambiguous from that as to whether it indents the first
line or not. The Emacs manual is clearer, saying:

   Like <RET> followed by inserting and aligning a comment

Ie, it does not indent the first line, only the second.
Under these criteria, it appears to be working correctly.

Personally I prefer C-j `f90-indent-new-line'.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]