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

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

Re: Edit region in different mode


From: Albert Reiner
Subject: Re: Edit region in different mode
Date: 22 Dec 2004 18:05:02 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

["V. L. Simpson" <address@hidden>, 22 Dec 2004 10:25:42 -0600]:
> >>>>> "Albert" == Albert Reiner <address@hidden> writes:
> 
>     > Hi, is there a way of editing the current region in a
>     > different mode?  OK,
> 
> Try http://mmm-mode.sourceforge.net/

Thanks, but I am well aware of mmm mode, and it does not seem to be a
solution to my problem: although the documentation seems hard to find,
I believe that mmm mode still requires me to put tags into the file
that indicate where to switch between modes.  This is not what I want;
in fact, it is what I already have but is giving me trouble in some
cases.  I really only want to edit in a different mode for a short
period of time, without leaving any mode-related traces in the file.

Maybe I should explain in more detail: I am using noweb mode with
noweb-code-mode set to lisp-mode (which is in fact slime mode).
Unfortunately the lisp-mode indentation and filling functions do not
work very well in lisp doc strings, and all the more so when the
quotes are not part of the same code chunk.  Part of the problem is
that noweb-mode overrides any M-x outline-mode RET in what it knows is
a code chunk.

So whenever I write a long documentation string I copy the old text to
*scratch*, change to outline-mode, write / edit there, copy the edited
text back.  Or sometimes I remove the chunk-starting line, edit
(effectively in LaTeX mode, which may be sufficient), and add back the
chunk-starting line.  I have also tried M-: (setq noweb-code-mode
'outline-mode) RET and M-x normal-mode RET later, but none of these
are very convenient.

Albert.



reply via email to

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