This isn't so difficult, once the realization is made that there are special functions for setting various variables within the noweb-mode
.
Here is the chunk of code that I added to my .emacs
file (or rather to my site-init.el
file:
(defun Rnw-mode () (interactive) (require 'ess-noweb) (noweb-mode) (noweb-set-doc-mode 'ultra-tex-mode) (if (fboundp 'R-mode) (setq noweb-set-code-mode 'R-mode)))
It is somewhat different than the code given at the Sweave site, but it works w/o errors about a missing latex.el
file.