From: wewwew <wew036@cs.usask.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: How to force noweb mode to use code-mode?
Date: Sun, 16 Aug 2009 17:37:16 -0700 (PDT) [thread overview]
Message-ID: <1d8c07d4-2702-422b-997e-a77d62224349@v36g2000yqv.googlegroups.com> (raw)
In-Reply-To: mailman.4750.1250466322.2239.help-gnu-emacs@gnu.org
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
prev parent reply other threads:[~2009-08-17 0:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d8c07d4-2702-422b-997e-a77d62224349@v36g2000yqv.googlegroups.com \
--to=wew036@cs.usask.ca \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).