[ESS] initial fontification and doc mode in noweb

Bill Rising brising at louisville.edu
Tue May 17 23:19:16 CEST 2005

If I open a .Rnw file which contains only LaTeX commands, the  
document mode does not get set properly.

If, however, I go to the bottom of the file, insert a < (which then  
expands to <<>>= as it should), and then move back up into the  
initial doc chunk, the mode correctly switches to the correct doc  
mode. This seems to indicate that the chunks are not being fontified  
until there are more than the initial chunk 0.

Here is the code I have in my .emacs file to be sure that the modes  
are set:

(defun Rnw-mode ()
   (require 'ess-noweb)
   (noweb-set-doc-mode 'ultra-tex-mode)
   (if (fboundp 'R-mode)
       (setq noweb-default-code-mode 'R-mode)
     (message "R-mode not yet bound"))

What am I missing here?



More information about the ESS-help mailing list