Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!davis From: davis@pacific.mps.ohio-state.edu ("John E. Davis") Newsgroups: comp.lang.fortran Subject: Re: Fortran-mode in emacs Message-ID: Date: 30 Jul 90 17:40:31 GMT References: <1990Jul30.005504.1@csc.fi> Sender: news@pacific.mps.ohio-state.edu Reply-To: davis@pacific.mps.ohio-state.edu (John E. Davis) Organization: "Dept. of Physics, The Ohio State University" Lines: 40 In-reply-to: sbs@csc.fi's message of 30 Jul 90 00:55:04 GMT In article <1990Jul30.005504.1@csc.fi> sbs@csc.fi writes: 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? > [stuff deleted] 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...'. ------------------------------------------------------------- While this works, I bind the return key to 'newline-and-indent'. This way, hitting the return automatically indents the next line. Also you might want to bind it to 'reindent-then-newline-and-indent' which indents the current line then opens a newline and indents it properly. -- John bitnet: davis@ohstpy internet: davis@pacific.mps.ohio-state.edu