开发者

Better indentation in two-mode-mode in Emacs

I am using Emacs to modify code which is interleaving Perl and Verilog. I am using two-mode-mode to switch between the two, which works as expected. The problem is that the perl code is indicated on a line by line basis with //; as shown here:

This is verilog code
// This is a verilog comment
//; This is perl code
//;   This is more perl code
This is verilog code again.

While the two-mode-mode recognizes that it's Perl, it does it on a l开发者_如何学JAVAine by line basis, so indentation and such is not meaningful across lines.

What I would like to do is have the Perl code be formatted as usual, but ignoring the //; characters (they should just be left alone at the start of the line, then the Perl formatted as usual). Any ideas of an easy way to do this? I've just started peeking at the mode files and they are understandably complicated, so any hint would be appreciated!


You might have better luck with a different multi-mode mode:

http://www.emacswiki.org/emacs/MultipleModes

AFAIK, mumamo is the most active one these days.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜