summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-05-24 22:05:59 -0400
committerKyle Meyer <kyle@kyleam.com>2015-05-24 22:05:59 -0400
commit8cbc9c2588fc1b42fdc7d86e30139f685d2f9edb (patch)
tree6104ef9d472d1b65ff4f54b3c0acc0027cc66a5b
parentbf1bacdf8fd3137172588c17a58336ecfd0ba81f (diff)
downloademacs.d-8cbc9c2588fc1b42fdc7d86e30139f685d2f9edb.tar.gz
Add command ess-eval-buffer-up-to-line
-rw-r--r--lisp/init-ess.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/init-ess.el b/lisp/init-ess.el
index bf884f6..23dc3ba 100644
--- a/lisp/init-ess.el
+++ b/lisp/init-ess.el
@@ -31,6 +31,11 @@
(setq local-abbrev-table ess-mode-abbrev-table)))
(add-hook hook 'abbrev-mode))
+(defun km/ess-eval-buffer-up-to-line ()
+ "Send up to the current line to inferior ESS process."
+ (interactive)
+ (ess-eval-region (point-min) (line-end-position) nil))
+
(defvar km/ess-dplry-pipe-key "|")
(defun km/ess-insert-dplyr-pipe ()
@@ -43,6 +48,7 @@ this would work, but it seems to so far."
(call-interactively #'ess-smart-S-assign)))
(after 'ess-mode
+ (define-key ess-mode-map (kbd "C-c C-.") 'km/ess-eval-buffer-up-to-line)
(define-key ess-mode-map "|" 'km/ess-insert-dplyr-pipe))
(after 'ess-inf