[PlanetCCRMA] Getting SuperCollider to work

andersvi@extern.uio.no andersvi@extern.uio.no
Sun Jul 1 05:52:06 2007


>>>>> "G" == Gregory D Weber <gdweber@indiana.edu> writes:

    G> 2.  Multiple lines of code enclosed in parentheses cannot be executed
    G> using C-M-x; however, they CAN be evaluated by selecting the lines as a
    G> region and evaluating the region (C-c C-x)


There has been at least 2 different causes for this bug.  If youre
using emacs v.21.* it should be sufficient to upgrade the scel-code.



If you're using emacs v.22 i think the cause for this error is in the
definition of 'beginning-of-defun-raw in emacs v.22's
site-lisp/lisp.el - where the 'beginning-of-defun-function is called
in a 'dotimes'-statement, but returns (the default for dotimes) nil.
(I beleive this is a bug.)

This gives troubles in sclang-language.el, making
'(beginning-of-defun-raw 1)' return nil, regardless of whether the
function called by it actually finds a beginning of defun and returns
t.

If youre using Emacs v.22, try this definition of
'beginning-of-defun-raw and see if C-M-x works:


(defun beginning-of-defun-raw (&optional arg)
  "Move point to the character that starts a defun.
This is identical to function `beginning-of-defun', except that point
does not move to the beginning of the line when `defun-prompt-regexp'
is non-nil.

If variable `beginning-of-defun-function' is non-nil, its value
is called as a function to find the defun's beginning."
  (interactive "p")
  (if beginning-of-defun-function
      (funcall beginning-of-defun-function)
    (and arg (< arg 0) (not (eobp)) (forward-char 1))
    (and (re-search-backward (if defun-prompt-regexp
				 (concat (if open-paren-in-column-0-is-defun-start
					     "^\\s(\\|" "")
					 "\\(" defun-prompt-regexp "\\)\\s(")
			       "^\\s(")
			     nil 'move (or arg 1))
	 (progn (goto-char (1- (match-end 0)))) t)))