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

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

Re: Changing Languages in a file


From: Colin S. Miller
Subject: Re: Changing Languages in a file
Date: Wed, 09 Sep 2009 13:46:47 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

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.


reply via email to

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