Thanks for your help with this. I now have another file mode specification
error: (void-variable tool-bar-mode)

This toolbar issue also seems like something related to the assumption that
emacs is running in windowed mode. The symptom is that when I use emacs to
open a .Rnw file, there is no syntax highlighting. I need to explicitly run
"M-x Rnw-mode" to set up highlighting.

I'm using emacs 22.1.1. Below is my stripped down .emacs file along with the
Message buffer which comes up when I run "emacs -nw ms.Rnw" from the command
line:

.emacs file:

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(auto-compression-mode t nil (jka-compr))
 '(case-fold-search t)
 '(current-language-environment "UTF-8")
 '(default-input-method "rfc1345")
 '(frame-background-mode (quote light))
 '(indent-region-mode t)
 '(mumamo-global-mode t)
 '(nxhtml-global-minor-mode t)
 '(show-paren-mode t nil (paren))
 '(transient-mark-mode t)
 '(uniquify-buffer-name-style (quote forward) nil (uniquify)))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(font-lock-comment-face ((((class color) (min-colors 8) (background
light)) (:foreground "red")))))

;;Stop the startup screen for Emacs 22
(setq inhibit-startup-message t)

;;Load auctex
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)

;;; ESS setup for version 5.3.6
(setq ess-noweb-use-font-lock t)  ;;Fix from here:
http://article.gmane.org/gmane.emacs.ess.general/2760
(load "~/downloads/ess-5.3.6/lisp/ess-site")



*Messages buffer*

("emacs" "ms.Rnw")
Loading encoded-kb...done
Loading paren...done
Loading advice...done
Loading /opt/local/share/emacs/site-lisp/tex-site.el (source)...done
Loading ~/downloads/ess-5.3.6/lisp/ess-site...
Loading regexp-opt...done
Loading ~/downloads/ess-5.3.6/lisp/ess-site...done
For information about the GNU Project and its goals, type C-h C-p.
Loading image...done
Fontifying from 0 to 2
Loading latex...
Loading edmacro...done
Loading easy-mmode...done
Loading latex...done
Loading font-latex...
Loading bytecomp...done
Loading font-latex...done
Applying style hooks... done
Sorting environment...
Removing duplicates... done
File mode specification error: (void-variable tool-bar-mode)
Applying style hooks... done


Any advice would be much appreciated.

--B

PS: by the way, the reason I use emacs -nw is that I do a lot of stuff at
the command line, and it gives me a consistent interface whether I'm working
on my local Mac or a remote box.

	[[alternative HTML version deleted]]


