I've been using emacs for a long time, mostly for Fortran and Python programming. I'm currently porting some code from fixed-format to free-format Fortran, which means the extension of the source file would change from ".f" to ".f90" -- and the code, which is standard Fortran 95, would have the F90 filter (f90.el by Glenn Morris) applied instead of the fortran.el (fortran mode) filter.
In the old fortran mode filter, intrinsics such as mod, exp, and others would be highlighting in a different color (say, pink) than the control flow commands such as if/endif, do/enddo (which would be in purple). In the F90 mode, these commands are all highlighted in the same color. I find this to be undesirable, but I'm not sure how to change it. Poking around the f90.el source and google tells me it will involve something like set-face-foreground of a font-lock mode, but I don't know what to do.
Can anyone help me out in getting my syntax highlighting customized? Or should I email the maintainer of the filters? I am using emacs 22.1 on Fedora 8 and also Aquamacs 1.3 (based on emacs 22.1) on OS X Leopard.
bcbar...@gmail.com wrote: > In the old fortran mode filter, intrinsics such as mod, exp, and > others would be highlighting in a different color (say, pink) than the > control flow commands such as if/endif, do/enddo (which would be in > purple). In the F90 mode, these commands are all highlighted in the > same color. I find this to be undesirable, but I'm not sure how to > change it.
I don't really know why it is like it is, but it is. Anyway, add to ~/.emacs:
> In the F90 mode, these commands are all highlighted in the > same color. I find this to be undesirable, but I'm not sure how to > change it. Poking around the f90.el source and google tells me it > will involve something like set-face-foreground of a font-lock mode, > but I don't know what to do.
In case you want to change the colour, you can start with C-u C-x = on a character in the unwanted face (font and colour). A *Help* buffer opens, allowing you to customise the settings in the "paragraph" where it describes the text properties.
In your case it will fail, because apparently different sorts of key words are mixed. So you would change the face for all of them again, for the whole set or "mixed" case.
-- Greetings
Pete
A morning without coffee is like something without something else.
> bcbar...@gmail.com wrote: > > In the old fortran mode filter, intrinsics such as mod, exp, and > > others would be highlighting in a different color (say, pink) than the > > control flow commands such as if/endif, do/enddo (which would be in > > purple). In the F90 mode, these commands are all highlighted in the > > same color. I find this to be undesirable, but I'm not sure how to > > change it.
> I don't really know why it is like it is, but it is. Anyway, add to > ~/.emacs: