【发布时间】:2013-12-11 08:45:49
【问题描述】:
我正在编写一个 fortran 代码。源代码以老式 f77 风格编写,但采用 f90 注释风格,带有“!”被授权。我想在使用 cmets 在行上点击选项卡时编辑 emacs 行为。我可以区分 3 种类型的 cmets:
program helloworld
integer:: i,j
do i=1,1
do j=1,1
* This is a first type of comment
* another first type comment
! second type of comment
print *,"helloworld" ! third type of comment
enddo
enddo ! another third type comment
end program helloworld
当使用注释类型在每一行点击标签时,我得到了
program helloworld
integer:: i,j
do i=1,1
do j=1,1
* This is a first type of comment
* another first type comment
! second type of comment
print *,"helloworld" ! third type of comment
enddo
enddo ! another third type comment
end program helloworld
我想要的行为是,在一行中点击标签:
- 第一类评论:什么都不做
- 第二种注释:将行缩进为指令行
- 第三种注释:将行作为指令行缩进,指令和后面的注释之间不加空格
我试图在我的 init.el 中重写一些来自 fortran.el 的函数,但对 lisp 感到很疯狂。如果一些 lisp/emacs 战士可以帮助我,我会很高兴。
谢谢
【问题讨论】:
标签: emacs fortran elisp fortran90 fortran77