From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "a.fink" Newsgroups: gmane.emacs.help Subject: Need help with customizing two-mode-mode.el Date: Thu, 08 Oct 2009 11:32:25 -0400 Message-ID: <4ACE0609.2050709@magnosis.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1255061330 25920 80.91.229.12 (9 Oct 2009 04:08:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Oct 2009 04:08:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 09 06:08:40 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mw6mU-0004pO-Tw for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Oct 2009 06:08:39 +0200 Original-Received: from localhost ([127.0.0.1]:47306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw6mU-0002mI-Bk for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Oct 2009 00:08:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mvuyq-0007Th-MH for help-gnu-emacs@gnu.org; Thu, 08 Oct 2009 11:32:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mvuyj-0007O9-Fj for help-gnu-emacs@gnu.org; Thu, 08 Oct 2009 11:32:33 -0400 Original-Received: from [199.232.76.173] (port=39473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mvuyj-0007Np-1a for help-gnu-emacs@gnu.org; Thu, 08 Oct 2009 11:32:29 -0400 Original-Received: from vps.gitlweb.ca ([207.58.163.242]:49206) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mvuyi-0004tX-1K for help-gnu-emacs@gnu.org; Thu, 08 Oct 2009 11:32:28 -0400 Original-Received: from ottawa-hs-206-191-28-89.s-ip.magma.ca ([206.191.28.89] helo=katana.ott.sarance.com) by vps.gitlweb.ca with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Mvuyf-0003Xj-Nv for help-gnu-emacs@gnu.org; Thu, 08 Oct 2009 11:32:25 -0400 User-Agent: Thunderbird 2.0.0.19 (X11/20090107) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.gitlweb.ca X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - magnosis.com X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 09 Oct 2009 00:08:02 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68779 Archived-At: 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