unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fortran indentation
@ 2024-08-26 23:37 Ken Mankoff
  2024-08-27 12:17 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Mankoff @ 2024-08-26 23:37 UTC (permalink / raw)
  To: emacs-devel

Hello,

I'm working with Emacs 29.3, a Fortran file with this syntax,

do_foo = some_function()
  if (do_foo) then
    ...

and options

(setq fortran-do-indent 2)
(setq fortran-if-indent 2)
(setq fortran-structure-indent 2)

The if statement should not be indented, because do_foo is not the start  of a do loop. I can fix this behavior if I change line 1634 of fortrtan.el from

((looking-at "do\\b")

to

((looking-at "do\\ \\b")

I'm not terribly familiar with all the various old Fortran syntax options and often see very little whitespace (e.g., IF(ARR(I,J).LT.0.)THEN ) so it may be inappropriate to assume a space exists after DO.

Is this a reasonable fix? Should I submit a patch?

Thanks,

  Ken Mankoff



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

end of thread, other threads:[~2024-08-27 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 23:37 Fortran indentation Ken Mankoff
2024-08-27 12:17 ` Eli Zaretskii
2024-08-27 13:15   ` Ken Mankoff
2024-08-27 13:56     ` Eli Zaretskii

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).