From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: How to edit "mixed" (e.g. HTML/JavaScript) files? Date: Tue, 06 Mar 2007 22:07:59 +0100 Message-ID: <45EDD82F.4020208@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1173217505 22569 80.91.229.12 (6 Mar 2007 21:45:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2007 21:45:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 06 22:44:53 2007 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 1HOhSm-00009Z-8J for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Mar 2007 22:44:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOhSn-00063s-5l for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Mar 2007 16:44:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOhOp-0004gj-9y for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 16:40:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOhOn-0004g5-Qq for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 16:40:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOhOn-0004fz-MY for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 16:40:45 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HOhOk-0006pQ-C0 for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 16:40:42 -0500 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]) by mx20.gnu.org with esmtp (Exim 4.52) id 1HOgt5-00076B-Sz for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 16:08:00 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:59775 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1HOgt3-0001Nu-9F for help-gnu-emacs@gnu.org; Tue, 06 Mar 2007 22:07:58 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 In-Reply-To: X-Antivirus: avast! (VPS 000722-0, 2007-03-06), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1HOgt3-0001Nu-9F. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1HOgt3-0001Nu-9F 329bf35a447dbf96bb4f0a2d5dd1801b X-detected-kernel: Linux 2.6? (barebone, rare!) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:41735 Archived-At: kj wrote: > It often happens that a single file must contain code corresponding > to two different syntaxes. For example, an HTML file with embedded > JavaScript or CSS. > > Is there a way to *locally* override the mode of a file and replace > it with a different mode? > > If not, is there a good way to deal with such situations (other > than avoiding them altogether)? > > Thanks! > > kj It depends on whom you ask ;-) You may try nxhtml-part-mode in nXhtml (you need Emacs 22 beta): http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html Or you may try this http://www.emacswiki.org/cgi-bin/wiki/MultipleModes