* How to force noweb mode to use code-mode?
@ 2009-08-15 17:47 wewwew
2009-08-16 23:45 ` Peter Milliken
[not found] ` <mailman.4750.1250466322.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: wewwew @ 2009-08-15 17:47 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I am using noweb mode in Emacs to write noweb programs (LaTeX + C++).
It recognizes LaTeX fine. However, in most cases it cannot recognize
C
++ mode correctly. Is there a command to force noweb to drop into
the
code-mode? That way I can define a hot key to manually convert to
code-mode when it is not correct.
Thanks!
-Wenguang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to force noweb mode to use code-mode?
2009-08-15 17:47 How to force noweb mode to use code-mode? wewwew
@ 2009-08-16 23:45 ` Peter Milliken
[not found] ` <mailman.4750.1250466322.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Peter Milliken @ 2009-08-16 23:45 UTC (permalink / raw)
To: wewwew; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 757 bytes --]
I have the following as the first line of all my C++ .nw files:
-*- noweb-code-mode: c-mode; -*-
This tells noweb which major mode to switch when the code mode is entered.
Just change it as appropriate for whatever language you are using i.e. I
use
-*- noweb-code-mode: python-mode; -*-
when coding Python noweb files.
Peter
On Sun, Aug 16, 2009 at 3:47 AM, wewwew <wew036@cs.usask.ca> wrote:
> Hi,
> I am using noweb mode in Emacs to write noweb programs (LaTeX + C++).
> It recognizes LaTeX fine. However, in most cases it cannot recognize
> C
> ++ mode correctly. Is there a command to force noweb to drop into
> the
> code-mode? That way I can define a hot key to manually convert to
> code-mode when it is not correct.
> Thanks!
> -Wenguang
>
[-- Attachment #2: Type: text/html, Size: 1141 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to force noweb mode to use code-mode?
[not found] ` <mailman.4750.1250466322.2239.help-gnu-emacs@gnu.org>
@ 2009-08-17 0:37 ` wewwew
0 siblings, 0 replies; 3+ messages in thread
From: wewwew @ 2009-08-17 0:37 UTC (permalink / raw)
To: help-gnu-emacs
Yes, I did that already. The problem is the C/C++ mode uses more than
stuff in its chunk to render font size. For example:
This block's size is 4KB.
<<func>>=
int foo()
{
// a function's variable
int a;
}
@
Anything between the single quote in block's and another single quote
in function's is rendered as a large string, which is undesired.
On 8月16日, 下午4时45分, Peter Milliken <peter.milli...@gmail.com> wrote:
> I have the following as the first line of all my C++ .nw files:
> -*- noweb-code-mode: c-mode; -*-
>
> This tells noweb which major mode to switch when the code mode is entered.
> Just change it as appropriate for whatever language you are using i.e. I
> use
>
> -*- noweb-code-mode: python-mode; -*-
>
> when coding Python noweb files.
>
> Peter
>
>
>
> On Sun, Aug 16, 2009 at 3:47 AM, wewwew <wew...@cs.usask.ca> wrote:
> > Hi,
> > I am using noweb mode in Emacs to write noweb programs (LaTeX + C++).
> > It recognizes LaTeX fine. However, in most cases it cannot recognize
> > C
> > ++ mode correctly. Is there a command to force noweb to drop into
> > the
> > code-mode? That way I can define a hot key to manually convert to
> > code-mode when it is not correct.
> > Thanks!
> > -Wenguang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-17 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-15 17:47 How to force noweb mode to use code-mode? wewwew
2009-08-16 23:45 ` Peter Milliken
[not found] ` <mailman.4750.1250466322.2239.help-gnu-emacs@gnu.org>
2009-08-17 0:37 ` wewwew
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.