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

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

Re: Modes within modes


From: Kevin Rodgers
Subject: Re: Modes within modes
Date: Fri, 07 Nov 2003 11:01:07 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Gareth Rees wrote:

Dan Anderson wrote:

Often times I'll have an e-mail message with some code in it, or code
with some text in comments.  Is it possible to highlight a region and
tell Emacs to (use A-mode instead of B-mode)?


The simplest way to do this is to use 'clone-indirect-buffer' (C-x 4 c)
and use A-mode in the original buffer and B-mode in the cloned buffer.
Put the two buffers in adjacent windows and switch between them when you
want the features of the other mode.  See the Info node (emacs)Indirect
Buffers.

Wow, that is really cool!  Especially if you narrow each buffer to show just
the parts relevant to that mode.

--
Kevin Rodgers



reply via email to

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