help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: mixed language mode (Python + C)?


From: Xah Lee
Subject: Re: mixed language mode (Python + C)?
Date: Wed, 08 Dec 2010 15:17:40 -0000
User-agent: G2/1.0

On Jul 7, 5:23 am, Tom <tmb...@gmail.com> 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?  Ideal 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


reply via email to

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