From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: wewwew Newsgroups: gmane.emacs.help Subject: Re: How to force noweb mode to use code-mode? Date: Sun, 16 Aug 2009 17:37:16 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1d8c07d4-2702-422b-997e-a77d62224349@v36g2000yqv.googlegroups.com> References: <8441d4e2-9c28-417b-9623-448931556655@c14g2000yqm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1250469654 9486 80.91.229.12 (17 Aug 2009 00:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Aug 2009 00:40:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 17 02:40:47 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1McqHG-0008Op-To for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Aug 2009 02:40:47 +0200 Original-Received: from localhost ([127.0.0.1]:53750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McqHG-0005Rt-9R for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 20:40:46 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v36g2000yqv.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: 67.119.3.133 Original-X-Trace: posting.google.com 1250469436 25452 127.0.0.1 (17 Aug 2009 00:37:16 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 17 Aug 2009 00:37:16 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v36g2000yqv.googlegroups.com; posting-host=67.119.3.133; posting-account=RZ5uTwkAAACKKd_1JWs8luP2Ks9v8SYd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; zh-cn) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:172040 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67215 Archived-At: 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. <>=3D 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=D4=C216=C8=D5, =CF=C2=CE=E74=CA=B145=B7=D6, Peter Milliken 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 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