Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!tut!funic!csc.fi!sbs From: sbs@csc.fi Newsgroups: comp.lang.fortran Subject: Re: Fortran-mode in emacs Message-ID: <1990Jul30.005504.1@csc.fi> Date: 30 Jul 90 00:55:04 GMT References: Sender: usenet@nic.funet.fi Organization: Finnish Academic and Research Network Project - FUNET Lines: 51 In article , sullivan@msor.exeter.ac.uk (Rob Sullivan) writes: > I would be very grateful if someone could point me in the right > direction for an enhanced fortran-mode for emacs. Specifically, I > would like to see emacs correctly indenting the code as I type it. Is > this at all possible or am I just dreaming? > > Thanks in advance, > > Rob... > > -- > - - - - > Robert Sullivan JANET : sullivan@uk.ac.exeter.msor > Theoretical Physics Dept. UUCP : sullivan%msor.exeter.ac.uk@ukc.uucp > University of Exeter BITNET : sullivan%msor.exeter.ac.uk@UKACRL > England. Internet : sullivan%msor.exeter.ac.uk@cunyvm.cuny.edu > EX4 4QL Tel : +44 392 264198 > > "One must be open-minded -- > --but not so open-minded that one's brains fall out." hi! I assume you are using GNU-emacs or related (a good fortran-mode available). use 'TAB'-character (control-I) in the lines where you want the indenting. fortran-mode DOES NOT add tabs, but spaces. for example: IF (i.eq.9) THEN write(6,*)'good bye' ENDIF becomes IF (i.eq.9) THEN write(6,*)'good bye' ENDIF if u use 'tab' in line 'write...'. this is almost all I need when I code with emacs. there is other tools available too, which format whole file of code. I have heard, however, that this will fail sometimes, if you have too much comment lines (never tested myself!). regards, Sami Saarinen Center for Scientific Computing, Finland mail: sbs@csc.fi