2 '(mapcar 'ess-noweb-make-variable-permanent-local
4 ess-local-process-name ;; also made permanent in ess-mode, but let it be
11 ess-noweb-default-code-mode
12 ess-noweb-last-chunk-index)))
14 (defun ess-change-directory (path)
15 "Set the current working directory to PATH for both *R* and Emacs."
16 (interactive "DDirectory to change to: ")
18 (when (file-exists-p path)
19 (ess-command (concat "setwd(\"" path "\")\n"))
20 ;; use file-name-as-directory to ensure it has trailing /
21 (setq default-directory (file-name-as-directory path))))
22 (add-hook 'ess-mode-hook 'flyspell-prog-mode)
23 ;;; outlining support for ess modes
24 (add-hook 'ess-mode-hook
27 (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function\\)")
28 (defun outline-level ()
29 (cond ((looking-at "^##### ") 1)
30 ((looking-at "^#### ") 2)
31 ((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3)
34 (add-hook 'ess-mode-hook
36 (local-set-key (kbd "C-c C-R")
37 'dla/ess-region-remote-eval)))