unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Angelo Graziosi <angelo.graziosi@alice.it>
Cc: 5595@debbugs.gnu.org
Subject: bug#5595: Commenting in F90
Date: Fri, 19 Feb 2010 04:12:14 -0500	[thread overview]
Message-ID: <uc635tlhch.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <4B7D16C2.3070908@alice.it> (Angelo Graziosi's message of "Thu\,  18 Feb 2010 11\:30\:26 +0100")

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

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	other threads:[~2010-02-19  9:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 10:30 bug#5595: Commenting in F90 Angelo Graziosi
2010-02-19  9:12 ` Glenn Morris [this message]
2010-02-19  9:42   ` Angelo Graziosi
2010-02-19 18:01     ` Glenn Morris
2010-02-21  0:33       ` Angelo Graziosi
2010-02-19 18:25     ` Stefan Monnier
2022-02-05 23:44 ` bug#14448: Wrong indentation in comment lines for F90 mode? Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uc635tlhch.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=5595@debbugs.gnu.org \
    --cc=angelo.graziosi@alice.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).