all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fred Krogh <fkrogh@mathalacarte.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 14076@debbugs.gnu.org
Subject: bug#14076: 24.3; Comments in Fortran Source
Date: Tue, 02 Apr 2013 17:34:58 -0700	[thread overview]
Message-ID: <515B7932.7020206@mathalacarte.com> (raw)
In-Reply-To: <oawqsk5utz.fsf@fencepost.gnu.org>

On 04/02/2013 05:19 PM, Glenn Morris wrote:
> Please keep the debbugs address cc'd.
>
> Fred Krogh wrote:
>
>> O.k. The program shows up with emacs -Q with this program
>>
>> program tmp
>>    integer :: i
>>    do i = 1, 5
>> ! Comment
>>       print '("i=",i0)', i
>>    end do
>> end program tmp
>>
>> Highlight the whole program, then <cntrl><alt>\
>> and the ! Comment is indented, and I think this should not happen.
> Why do you think it should not happen?
> F90 mode has always behaved like this.
I'm hoping that just because it has "always" done this, that does not 
make it correct.
>
> Earlier you said:
>
>> I have options set so that comments should not be touched when
>> formatting a region,
> What options are those?

fortran-comment-indent-style is a variable defined in `fortran.el'.
Its value is nil
Original value was fixed

   This variable is safe as a file local variable if its value
   satisfies the predicate which is a byte-compiled expression.

Documentation:
How to indent comments.
nil forces comment lines not to be touched;
`fixed' indents to `fortran-comment-line-extra-indent' columns beyond
   `fortran-minimum-statement-indent-fixed' (if `indent-tabs-mode' nil), or
   `fortran-minimum-statement-indent-tab' (if `indent-tabs-mode' non-nil);
`relative' indents to current Fortran indentation plus
   `fortran-comment-line-extra-indent'.

You can customize this variable.

Specifically nil forces comment lines not to be touched.  When you get 
down to it, I don't care what nil does, but I certainly want some way to 
say "don't change my comments".  But from the above, that seems to be 
what nil is supposed to do.  I'd be happy if there was some choice that 
did this, but here is what I see for choices


Fortran Comment Indent Style:
(*) Untouched
( ) fixed
( ) relative
     State : SAVED and set.
    How to indent comments. Hide
    nil forces comment lines not to be touched;
    `fixed' indents to `fortran-comment-line-extra-indent' columns beyond
      `fortran-minimum-statement-indent-fixed' (if `indent-tabs-mode' 
nil), or
      `fortran-minimum-statement-indent-tab' (if `indent-tabs-mode' 
non-nil);
    `relative' indents to current Fortran indentation plus
      `fortran-comment-line-extra-indent'.
Groups: Fortran Indent

I have fortran-comment-line-extra-indent set to 0.  Perhaps there is 
some combination in there that would make it do what I want, but since 
it appears that nil should do the job, I've filed this report.

Many thanks for looking into this.
Fred





  reply	other threads:[~2013-04-03  0:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 15:44 bug#14076: 24.3; Comments in Fortran Source fkrogh
2013-03-30  1:46 ` Glenn Morris
2013-03-30  2:27   ` Fred Krogh
2013-04-03  0:19     ` Glenn Morris
2013-04-03  0:34       ` Fred Krogh [this message]
2013-04-03  1:01         ` Glenn Morris
2013-04-03  1:57           ` Fred Krogh
2013-04-04  3:50             ` Glenn Morris
2013-04-04  4:27               ` Fred Krogh
2013-04-04 12:36               ` Stefan Monnier
2013-04-05 19:18                 ` Glenn Morris
2013-04-03 19:04           ` Stefan Monnier
2013-04-04  3:51             ` Glenn Morris

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

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

  git send-email \
    --in-reply-to=515B7932.7020206@mathalacarte.com \
    --to=fkrogh@mathalacarte.com \
    --cc=14076@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.