all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need help with customizing two-mode-mode.el
@ 2009-10-08 15:32 a.fink
  0 siblings, 0 replies; only message in thread
From: a.fink @ 2009-10-08 15:32 UTC (permalink / raw)
  To: help-gnu-emacs

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,
--
Antoine
afink@magnosis.com




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-08 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 15:32 Need help with customizing two-mode-mode.el a.fink

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.