1 * Fortran editing helpers for Emacs
5 You write (or work on) large, modern fortran code bases. These make
6 heavy use of function overloading and generic interfaces. Your brain
7 is too small to remember what all the specialisers are called.
8 Therefore, your editor should help you. This is an attempt to do
11 f90-interface-browser.el is a (simple-minded) parser of fortran that
12 understands a little about generic interfaces and derived types.
16 - =f90-parse-interfaces-in-dir= :: Parse all the fortran files in a
18 - =f90-parse-all-interfaces= :: Parse all the fortran files in a
19 directory and recursively in its subdirectories
20 - =f90-browse-interface-specialisers= :: Pop up a buffer showing all
21 the specialisers for a particular generic interface (prompted
23 - =f90-find-tag-interface= :: On a procedure call, show a list of the
24 interfaces that match the (possibly typed) argument list. If no
25 interface is found, this falls back to =find-tag=.
26 - =f90-list-in-scope-vars= :: List all variables in local scope. This
27 just goes to the top of the current procedure and collects named
28 variables, so it doesn't work with module or global scope
29 variables or local procedures.
30 - =f90-show-type-definition= :: Pop up a buffer showing a derived type
33 ** Customisable variables
35 - =f90-file-extensions= :: A list of extensions that the parser will
36 use to decide if a file is a fortran file.
38 ** Details and caveats
40 The parser assumes you write fortran in the style espoused in Metcalf,
41 Reid and Cohen. Particularly, variable declarations use a double
42 colon to separate the type from the name list.
44 Here's an example of a derived type definition:
47 real, allocatable, dimension(:) :: a
48 integer, pointer :: b, c(:)
53 Here's a subroutine declaration:
56 integer, intent(in) :: a
57 real, intent(inout), dimension(:,:) :: b
62 Local procedures whose names conflict with global ones will likely
63 confuse the parser. For example:
80 Also not handled are overloaded operators, scalar precision modifiers,
81 like =integer(kind=c_int)=, for which the precision is just ignored, and
82 many other of the hairier aspects of the fortran language.