From 70b15fb682d7793acb9b80816f0dbf4c255c0e64 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 4 Dec 2017 17:04:26 -0800 Subject: [PATCH] ess configuration is now in don-configuration.org --- emacs_el/configuration/don-configuration.org | 31 ++++++++++++++++++- emacs_el/configuration/ess_configuration.el | 32 -------------------- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index aea3448..feb124d 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -532,7 +532,36 @@ value, scrolling continues until there is no more output. #+BEGIN_SRC emacs-lisp (use-package ess :ensure t - :config (require 'ess_configuration)) + :config + (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)))) + (add-hook 'ess-mode-hook 'flyspell-prog-mode) + ;; outlining support for ess modes + (add-hook + 'ess-mode-hook + '(lambda () + (outline-minor-mode) + (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function\\)") + (defun outline-level () + (cond ((looking-at "^##### ") 1) + ((looking-at "^#### ") 2) + ((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) + (t 1000))) + )) + (add-hook 'ess-mode-hook + '(lambda () + (local-set-key (kbd "C-c C-R") + 'dla/ess-region-remote-eval))) + + ;; Don't restore history or save workspace image + '(inferior-R-args "--no-restore-history --no-save") + ) #+END_SRC ** Rainbowmode diff --git a/emacs_el/configuration/ess_configuration.el b/emacs_el/configuration/ess_configuration.el index a201eff..7335cd4 100644 --- a/emacs_el/configuration/ess_configuration.el +++ b/emacs_el/configuration/ess_configuration.el @@ -10,35 +10,3 @@ ; ess-noweb-code-mode ; ess-noweb-default-code-mode ; ess-noweb-last-chunk-index))) -(require 'ess-site) -(require 'ess_remote_eval) - -(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)))) -(add-hook 'ess-mode-hook 'flyspell-prog-mode) -;;; outlining support for ess modes -(add-hook 'ess-mode-hook - '(lambda () - (outline-minor-mode) - (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function\\)") - (defun outline-level () - (cond ((looking-at "^##### ") 1) - ((looking-at "^#### ") 2) - ((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) - (t 1000))) - )) -(add-hook 'ess-mode-hook - '(lambda () - (local-set-key (kbd "C-c C-R") - 'dla/ess-region-remote-eval))) - -;;; Don't restore history or save workspace image -'(inferior-R-args "--no-restore-history --no-save") - -(provide 'ess_configuration) -- 2.39.2