[ESS] [patch] minor modifications to .*paragraph-and-step functions

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Thu May 26 16:15:08 CEST 2011


hi Erik,

way back in Feb you sent this patch - sorry for delay, but I've now
applied it.  Thanks.


Stephen

> 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
> 
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list