Subject: 23.3; Formatting of Labeled Constructs in Fortran

From: [email-masked]
Date: Mon, 27 Jun 2011 12:24:26 -0700

This is more a feature request than a bug report.
In Fortran you can have construct names on code blocks.  It would be best
if the construct names did not effect the indentation of code that
follows.

Thus

     An ordinary line indented like here.
Construct_Name: do i = 1, 10
       Next line indented as if the construct name were not there.
Another_Construct_name: do j = 1, 30
And_Yet_Another_name: do k = 1,8
           The next line starts like this
         end do Construct_Name
       end do Another_Construct_name
     end do And_Yet_Another_name

Although I've been told, it is awkward to implement, I would like to be
able to use continuation lines so that the indentation structure of the
code is more clear.  Thus the above might look like this

     An ordinary line indented like here.
Construct_Name:&
&    do i = 1, 10
       Next line indented as if the construct name were not there.
Another_Construct_name:&
&      do j = 1, 30
And_Yet_Another_name:&
&        do k = 1,8
           The next line starts like this
         end do Construct_Name
       end do Another_Construct_name
     end do And_Yet_Another_name

But the key point is that the location of the construct name should not
effect the formatting of the lines that follow.  By using really short
construct names the first form can be made to look not all that bad.

In GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.22.1)
 of 2011-03-10 on mon
Windowing system distributor `The X.Org Foundation', version 11.0.11002000
configured using `configure  '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64' '--with-gameuser=games' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--with-gpm' '--with-dbus' '--with-sound' '--with-x' '--without-ns' '--without-gconf' '--without-toolkit-scroll-bars' '--without-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--without-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-O2 -march=native -pipe -fno-strict-aliasing' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: C
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: C
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: F90

Minor modes in effect:
  recentf-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:

Load-path shadows:
/usr/share/emacs/site-lisp/color-theme/color-theme hides /usr/share/emacs/site-lisp/my_old_color_theme_dir/color-theme
/usr/share/emacs/site-lisp/color-theme/themes/color-theme-library hides /usr/share/emacs/site-lisp/my_old_color_theme_dir/themes/color-theme-library
/usr/share/emacs/site-lisp/color-theme/themes/color-theme-example hides /usr/share/emacs/site-lisp/my_old_color_theme_dir/themes/color-theme-example
/usr/share/emacs/23.3/lisp/calc/calc-vec hides ~/system/emacs/calc-2.02f/calc-vec
/usr/share/emacs/23.3/lisp/calc/calc-lang hides ~/system/emacs/calc-2.02f/calc-lang
/usr/share/emacs/23.3/lisp/calc/calc-math hides ~/system/emacs/calc-2.02f/calc-math
/usr/share/emacs/23.3/lisp/calc/calc-embed hides ~/system/emacs/calc-2.02f/calc-embed
/usr/share/emacs/23.3/lisp/calc/calc-sel hides ~/system/emacs/calc-2.02f/calc-sel
/usr/share/emacs/23.3/lisp/calc/calc-yank hides ~/system/emacs/calc-2.02f/calc-yank
/usr/share/emacs/23.3/lisp/calc/calc-undo hides ~/system/emacs/calc-2.02f/calc-undo
/usr/share/emacs/23.3/lisp/calc/calc-units hides ~/system/emacs/calc-2.02f/calc-units
/usr/share/emacs/23.3/lisp/calc/calc-funcs hides ~/system/emacs/calc-2.02f/calc-funcs
/usr/share/emacs/23.3/lisp/calc/calc-stat hides ~/system/emacs/calc-2.02f/calc-stat
/usr/share/emacs/23.3/lisp/calc/calc-aent hides ~/system/emacs/calc-2.02f/calc-aent
/usr/share/emacs/23.3/lisp/calc/calc-misc hides ~/system/emacs/calc-2.02f/calc-misc
/usr/share/emacs/23.3/lisp/calc/calc-fin hides ~/system/emacs/calc-2.02f/calc-fin
/usr/share/emacs/23.3/lisp/calc/calc-forms hides ~/system/emacs/calc-2.02f/calc-forms
/usr/share/emacs/23.3/lisp/calc/calc-stuff hides ~/system/emacs/calc-2.02f/calc-stuff
/usr/share/emacs/23.3/lisp/calc/calc-poly hides ~/system/emacs/calc-2.02f/calc-poly
/usr/share/emacs/23.3/lisp/calc/calc-rewr hides ~/system/emacs/calc-2.02f/calc-rewr
/usr/share/emacs/23.3/lisp/calc/calc-keypd hides ~/system/emacs/calc-2.02f/calc-keypd
/usr/share/emacs/23.3/lisp/calc/calc-help hides ~/system/emacs/calc-2.02f/calc-help
/usr/share/emacs/23.3/lisp/calc/calc-prog hides ~/system/emacs/calc-2.02f/calc-prog
/usr/share/emacs/23.3/lisp/calc/calc-store hides ~/system/emacs/calc-2.02f/calc-store
/usr/share/emacs/23.3/lisp/calc/calc-bin hides ~/system/emacs/calc-2.02f/calc-bin
/usr/share/emacs/23.3/lisp/calc/calc-trail hides ~/system/emacs/calc-2.02f/calc-trail
/usr/share/emacs/23.3/lisp/calc/calc-mode hides ~/system/emacs/calc-2.02f/calc-mode
/usr/share/emacs/23.3/lisp/calc/calc-map hides ~/system/emacs/calc-2.02f/calc-map
/usr/share/emacs/23.3/lisp/calc/calc-cplx hides ~/system/emacs/calc-2.02f/calc-cplx
/usr/share/emacs/23.3/lisp/calc/calc-rules hides ~/system/emacs/calc-2.02f/calc-rules
/usr/share/emacs/23.3/lisp/calc/calc-graph hides ~/system/emacs/calc-2.02f/calc-graph
/usr/share/emacs/23.3/lisp/calc/calc hides ~/system/emacs/calc-2.02f/calc
/usr/share/emacs/23.3/lisp/calc/calc-alg hides ~/system/emacs/calc-2.02f/calc-alg
/usr/share/emacs/23.3/lisp/calc/calc-arith hides ~/system/emacs/calc-2.02f/calc-arith
/usr/share/emacs/23.3/lisp/calc/calc-macs hides ~/system/emacs/calc-2.02f/calc-macs
/usr/share/emacs/23.3/lisp/calc/calc-ext hides ~/system/emacs/calc-2.02f/calc-ext
/usr/share/emacs/23.3/lisp/calc/calc-comb hides ~/system/emacs/calc-2.02f/calc-comb
/usr/share/emacs/23.3/lisp/calc/calc-incom hides ~/system/emacs/calc-2.02f/calc-incom
/usr/share/emacs/23.3/lisp/calc/calc-frac hides ~/system/emacs/calc-2.02f/calc-frac

Features:
(shadow sort mail-extr message idna sendmail ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1
hex-util hashcash mail-utils warnings emacsbug color-theme cl cl-19
ps-bdf ps-mule ps-print ps-def lpr fortran f90 cus-edit cus-start
cus-load recentf tree-widget wid-edit cc-mode cc-fonts easymenu cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt pc-bufsw
uniquify advice help-fns advice-preload bm-ext bm scroll-in-place paren
site-gentoo preview-latex tex-site auto-loads tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
gtk x-toolkit x multi-tty emacs)