[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help with customizing two-mode-mode.el

From: a.fink
Subject: Need help with customizing two-mode-mode.el
Date: Thu, 08 Oct 2009 11:32:25 -0400
User-agent: Thunderbird (X11/20090107)

At work we are using our own preprocessor to allow Perl embedded inside Verilog HDL source files.

Each Perl line inside a verilog source file must be prepended with a ‘@@’ marker.

I have succesfully customized two-mode-mode.el such that is recognizes '@@' and EOL as the begin- and end-markers for the second mode (perl).

Now a problem comes with indenting.

- Outside the '@@' lines (while in verilog-mode), the indenter breaks because of ‘@@’ not being valid Verilog syntax.

- Inside a '@@' line (while in CPerl-mode), the indenter also breaks because of ‘@@’ not being valid Perl syntax.

In other words, neither of the two major modes accept the ‘@@’ as valid syntax, and thus indentation & fontification breaks for both modes.

How can I customize the two-mode-mode.el and/or verilog-mode.el code such that both verilog-mode and cperl-mode will ignore our ‘@@’ symbols during indentation and fontification, but yet two-mode-mode.el still recognizes it as the delimited between the two modes and continue doing its (awesome) job at allowing the mix of both major modes in a single buffer ?

This question / problem applies to both Emacs and XEmacs version 21 and above.

Thanks and kind regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]