modified sclang-eval-document to save-excursion to avoid clobbering point
This commit is contained in:
parent
fb35291e50
commit
d46a9661ab
1 changed files with 5 additions and 4 deletions
|
@ -549,10 +549,11 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil."
|
||||||
(defun sclang-eval-document (&optional silent-p)
|
(defun sclang-eval-document (&optional silent-p)
|
||||||
"Execute the whole document as SuperCollider code."
|
"Execute the whole document as SuperCollider code."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(save-excursion
|
||||||
(mark-whole-buffer)
|
(mark-whole-buffer)
|
||||||
(sclang-eval-string
|
(sclang-eval-string
|
||||||
(buffer-substring-no-properties (region-beginning) (region-end))
|
(buffer-substring-no-properties (region-beginning) (region-end))
|
||||||
(not silent-p)))
|
(not silent-p))))
|
||||||
|
|
||||||
(defvar sclang-eval-results nil
|
(defvar sclang-eval-results nil
|
||||||
"Save results of sync SCLang evaluation.")
|
"Save results of sync SCLang evaluation.")
|
||||||
|
|
Loading…
Reference in a new issue