all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* f90 indentation error and annoyance
@ 2004-10-08 17:33 Dave Love
  2004-10-11 17:50 ` Glenn Morris
  2004-11-25  0:51 ` Glenn Morris
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Love @ 2004-10-08 17:33 UTC (permalink / raw)


In a buffer in f90-mode, run indent-region on the following two lines
to get an error.  It fails with any main that doesn't start with
`program':

print 'foo'
end

I find it annoying that indenting an `end' statement always qualifies
it.  That should be customizable, and I think the default should be
not to.  E.g. indenting this:

program main
  print 'foo'
end

produces:

program main
  print 'foo'
end program main

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: f90 indentation error and annoyance
  2004-10-08 17:33 f90 indentation error and annoyance Dave Love
@ 2004-10-11 17:50 ` Glenn Morris
  2004-10-14 21:26   ` Dave Love
  2004-11-25  0:51 ` Glenn Morris
  1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2004-10-11 17:50 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dave Love wrote:

> In a buffer in f90-mode, run indent-region on the following two lines
> to get an error.  It fails with any main that doesn't start with
> `program':
>
> print 'foo'
> end
>
> I find it annoying that indenting an `end' statement always qualifies
> it.  That should be customizable, and I think the default should be
> not to.

It is customizable - set f90-smart-end to nil. The doc for that
variable is not very clear, though, so I'll improve it. Setting it to
nil also avoids your bug, but I will look for a proper fix.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: f90 indentation error and annoyance
  2004-10-11 17:50 ` Glenn Morris
@ 2004-10-14 21:26   ` Dave Love
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Love @ 2004-10-14 21:26 UTC (permalink / raw)


Glenn Morris <gmorris+emacs@ast.cam.ac.uk> writes:

> It is customizable - set f90-smart-end to nil.

I thought it didn't used to happen for me...  I actually checked the
code, but I must have looked at the wrong level.  (You wouldn't guess
I was once muggins for it :-/.)

> The doc for that variable is not very clear, though,

Indeed.

> so I'll improve it. Setting it to
> nil also avoids your bug, but I will look for a proper fix.

I think blinking the block start ought to be orthogonal to inserting
the extra text.  I still think the latter shouldn't be the default
since it does more than indent the line.

I think f90-mode generally tries to be too clever rather than just
obeying the normal conventions, but I never had time to tidy it up.
E.g. TAB should work via indent-line-function rather than being
rebound directly to f90-indent-line.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: f90 indentation error and annoyance
  2004-10-08 17:33 f90 indentation error and annoyance Dave Love
  2004-10-11 17:50 ` Glenn Morris
@ 2004-11-25  0:51 ` Glenn Morris
  1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2004-11-25  0:51 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dave Love wrote:

> In a buffer in f90-mode, run indent-region on the following two
> lines to get an error. It fails with any main that doesn't start
> with `program':
>
> print 'foo'
> end

OK, I have at last checked a fix for such cases into CVS. It was a wee
bit hacky (indentation, blech) so please let me know if it still fails
in some cases.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-25  0:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-08 17:33 f90 indentation error and annoyance Dave Love
2004-10-11 17:50 ` Glenn Morris
2004-10-14 21:26   ` Dave Love
2004-11-25  0:51 ` Glenn Morris

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.