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 >