From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: mixed language mode (Python + C)? Date: Wed, 7 Jul 2010 07:42:09 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4750710b-f33b-413c-817f-1c01f37b3c01@l25g2000prn.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291849915 4670 80.91.229.12 (8 Dec 2010 23:11:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 23:11:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 00:11:51 2010 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.69) (envelope-from ) id 1PQTAt-0004Dq-6Y for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:11:51 +0100 Original-Received: from localhost ([127.0.0.1]:58444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQTAs-0003Ny-Dj for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 18:11:50 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!l25g2000prn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: 67.180.85.8 Original-X-Trace: posting.google.com 1278513729 12299 127.0.0.1 (7 Jul 2010 14:42:09 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 7 Jul 2010 14:42:09 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l25g2000prn.googlegroups.com; posting-host=67.180.85.8; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4, gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:179574 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:76193 Archived-At: On Jul 7, 5:23=A0am, Tom wrote: > With tools like Python and Weave, some of my source files now contain > mixed Python and C code. > > Is there some mode or support for having multiple language support in > the same buffer? =A0Ideal would be something that actually just switches > completely transparently, but even something that lets me narrow to a > Python string and edit that in C mode would be useful. > > Of course, if it helps, I could indicate which language something is > in with comments similar to those found at the top of files. there were several packages that make this happen, variously named multi mu ma or something like that. From what i've reead on the wiki or here, i never attempted to install them because they are too complex. the thing is that emacs's syntax coloring system wasn't designed for multi-langs in a single page, pretty much needed today for html/css/js/ asp/php. you might check the emacswiki and try those packages. what i typically do is to assign a key shortcut to switch me to say html mode, and another for css mode. So, when i want to work on html section, press f6, and when in js section i press f7, etc. Xah