+ '(menu ((((type x-toolkit)) (:background "black" :foreground "grey90")))))
+
+(defun ess-change-directory (path)
+ "Set the current working directory to PATH for both *R* and Emacs."
+ (interactive "DDirectory to change to: ")
+
+ (when (file-exists-p path)
+ (ess-command (concat "setwd(\"" path "\")\n"))
+ ;; use file-name-as-directory to ensure it has trailing /
+ (setq default-directory (file-name-as-directory path))))
+
+(put 'upcase-region 'disabled nil)
+
+(put 'downcase-region 'disabled nil)