[ESS] [patch] minor modifications to .*paragraph-and-step functions
Erik Iverson
eriki at ccbr.umn.edu
Mon Feb 21 05:06:53 CET 2011
Hello,
I find the following small change useful when using C-c C-c to
step through R code. It uses (ess-next-code-line) to move around
the buffer after evaluation, skipping blank lines and comments.
Might be useful for others, seems to work fine in my cursory testing.
--Erik
Index: lisp/ess-inf.el
===================================================================
--- lisp/ess-inf.el (revision 4461)
+++ lisp/ess-inf.el (working copy)
@@ -1218,7 +1218,8 @@
(princ (concat "Loading: " name) t)
(ess-eval-region beg end-fun vis
(concat "Eval function " name))
- (goto-char (1+ end-fun)))
+ (goto-char end-fun)
+ (ess-next-code-line))
;; else: not in a function
(ess-eval-paragraph-and-step vis)
))
@@ -1331,7 +1332,8 @@
the next paragraph. Arg has same meaning as for `ess-eval-region'."
(interactive "P")
(let ((beg-end (ess-eval-paragraph vis)))
- (goto-char (1+ (cadr beg-end))))
+ (goto-char (cadr beg-end))
+ (ess-next-code-line))
)
;;; Related to the ess-eval-* commands, there are the ess-load
More information about the ESS-help
mailing list