all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: mixed language mode (Python + C)?
Date: Wed, 7 Jul 2010 07:42:09 -0700 (PDT)	[thread overview]
Message-ID: <4750710b-f33b-413c-817f-1c01f37b3c01@l25g2000prn.googlegroups.com> (raw)
In-Reply-To: aeb0031a-594e-4428-aa46-449442f8b877@i31g2000yqm.googlegroups.com

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	other threads:[~2010-07-07 14:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <aeb0031a-594e-4428-aa46-449442f8b877@i31g2000yqm.googlegroups.com>
2010-07-07 14:42 ` Xah Lee [this message]
2010-07-07 17:09 ` mixed language mode (Python + C)? unfrostedpoptart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4750710b-f33b-413c-817f-1c01f37b3c01@l25g2000prn.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.