From: "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Changing Languages in a file
Date: Wed, 09 Sep 2009 13:46:47 +0100 [thread overview]
Message-ID: <4aa7a3b7$0$288$14726298@news.sunsite.dk> (raw)
In-Reply-To: <mailman.6255.1252454488.2239.help-gnu-emacs@gnu.org>
Jonathan Seng wrote:
> I need to change languages within a file used for generating code in
> another language. For example, I might have a Python script generating
> C or C++ code.
>
> The documentation tells me I can specify at the top of the file for the
> entire file, but I can't find a way to change this for sections of a file.
>
> Is there a way to do this?
>
> Thank you,
>
> Jonathan
Jonathan,
If the C code is localalised to a few blocks in the python, then
this works.
M-x make-indirect-buffer RET <new buffer name>
C-x b <new buffer name>
Select the C code
M-x narrow-to-region
M-x c-mode
Not idea but it works.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
next prev parent reply other threads:[~2009-09-09 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.6255.1252454488.2239.help-gnu-emacs@gnu.org>
2009-09-09 7:41 ` Changing Languages in a file Anselm Helbig
2009-09-09 12:46 ` Colin S. Miller [this message]
2009-09-08 20:01 Jonathan Seng
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='4aa7a3b7$0$288$14726298@news.sunsite.dk' \
--to=no-spam-thank-you@csmiller.demon.co.uk \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).