Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

multi-programming language alignment??

0 views
Skip to first unread message

Xend

unread,
Oct 2, 2009, 11:46:10 PM10/2/09
to
i edit a Ruby file, and programming with inline C, mode is ruby-mode,
so emacs can't alignment C, like this:

require "inline"

class Mytest
#c is here, not alignment
inline do |builder|
builder.c
"
long add(int b, int a)
{
return a +
b;
}"
#c end
end
end


are there some tool can alignment C in Ruby??thanks

Teemu Likonen

unread,
Oct 3, 2009, 12:20:11 AM10/3/09
to
On 2009-10-02 20:46 (-0700), Xend wrote:

> i edit a Ruby file, and programming with inline C, mode is ruby-mode,
> so emacs can't alignment C, like this:

> are there some tool can alignment C in Ruby??thanks

I don't know if there is such tool but Emacs has a built-in feature
which can handle several modes in the same text content: indirect
buffers. Clone your buffer with "C-x 4 c" so you have two buffers which
always have equal content and refer to the same file but are otherwise
separate buffers. You can use different major and minor modes and
buffer-local variables in indirect buffers.

0 new messages