Skip to content

Instantly share code, notes, and snippets.

@gusano
Created November 13, 2012 10:53
Show Gist options
  • Save gusano/4065181 to your computer and use it in GitHub Desktop.
Save gusano/4065181 to your computer and use it in GitHub Desktop.
Highlight SuperCollider evaluated code via pulse
diff --git a/editors/scel/el/sclang-interp.el b/editors/scel/el/sclang-interp.el
index b254038..ce38fed 100644
--- a/editors/scel/el/sclang-interp.el
+++ b/editors/scel/el/sclang-interp.el
@@ -545,7 +545,8 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil."
(interactive "P")
(let ((string (sclang-line-at-point)))
(when string
- (sclang-eval-string string (not silent-p)))
+ (sclang-eval-string string (not silent-p))
+ (pulse-momentary-highlight-one-line (point)))
(and sclang-eval-line-forward
(/= (line-end-position) (point-max))
(forward-line 1))
@@ -569,6 +570,8 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil."
(let ((string (sclang-defun-at-point)))
(when (and string (string-match "^(" string))
(sclang-eval-string string (not silent-p))
+ (multiple-value-bind (beg end) (sclang-point-in-defun-p)
+ (pulse-momentary-highlight-region beg end))
string)))
(defun sclang-eval-document (&optional silent-p)
--
1.7.10.
@gusano
Copy link
Author

gusano commented Nov 13, 2012

Just patch this and add the following to your ~/.emacs:

(require 'pulse)

and you get evaluated code highlight in sc =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment