문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top