From d46a9661abe67bff0c8973ca545ae6276c5405c0 Mon Sep 17 00:00:00 2001 From: Stuart Popejoy Date: Thu, 9 Jun 2011 12:22:06 -0400 Subject: [PATCH] modified sclang-eval-document to save-excursion to avoid clobbering point --- el/sclang-interp.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/el/sclang-interp.el b/el/sclang-interp.el index 60d2d48..5360409 100644 --- a/el/sclang-interp.el +++ b/el/sclang-interp.el @@ -549,10 +549,11 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil." (defun sclang-eval-document (&optional silent-p) "Execute the whole document as SuperCollider code." (interactive "P") - (mark-whole-buffer) - (sclang-eval-string - (buffer-substring-no-properties (region-beginning) (region-end)) - (not silent-p))) + (save-excursion + (mark-whole-buffer) + (sclang-eval-string + (buffer-substring-no-properties (region-beginning) (region-end)) + (not silent-p)))) (defvar sclang-eval-results nil "Save results of sync SCLang evaluation.")