Reputation: 331
I am coding in fortran90 on Emacs (no-windows mode) with fortran-mode
. I have only used Emacs for Python for which it works without problem but now that I have switched to fortran90 I have many little issues that I don't know how to configure.
The biggest problem I have is with the commenting region command. I usually use M-; to comment regions but I get something like this:
c$$$ if (x1.eq.0) then
I know about the command
C-x r t
which actually does the trick (I can insert a !
at the beginning of each line) but I am so used to the M-; command and I wish I could keep using it. Also, with the latter command I can comment and un-comment the region.
So what I want to do is to replace the symbol for commenting in (and only in) fortran-mode
. And such that it works every time I open/close Emacs with fortran-mode
.
Thanks!
Upvotes: 2
Views: 316
Reputation: 30701
I haven't coded in Fortran for the last 30 years (!), and I'm not acquainted with Fortran mode in Emacs. But looking at library fortran.el
I see that there are some user options for customizing comment behavior. Take a look at them by using M-x customize-group fortran-comment
. The doc for each should be self-explanatory. If not, more info is available in the Emacs manual -- see node Fortran
and its subnodes, in particular, node Fortran Comments
. It specifically talks about M-;
in the context of Fortran mode, for instance.
Upvotes: 2