modified sclang-eval-document to save-excursion to avoid clobbering point

This commit is contained in:
Stuart Popejoy 2011-06-09 12:22:06 -04:00 committed by Tim Blechmann
parent fb35291e50
commit d46a9661ab

View file

@ -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.")