[CM] ilisp and emacs 21.3

Rick Taube taube@uiuc.edu
Thu, 16 Oct 2003 14:22:24 -0500


--Apple-Mail-10--21885117
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Assuming you use Xemacs or a GUI version of Emacs you can use the 
attached file (cm.el) to give you a reliable connection. just change 
the 'load' expression and the variable 'inferior-lisp-program' at the 
end of cm.el to reflect your machine.

then start emacs doing:

	emacs --load "cm.el"

and then start the inferionr lisp doing
	C-x l


--Apple-Mail-10--21885117
Content-Disposition: attachment;
	filename=cm.el
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="cm.el"

;; load this file into Emacs or Xemacs to start Common Music running
;; in a dedicated Listener window.

;;;
;;; Add CM/CLM/CMN extensions to automode.

(setq auto-mode-alist
      (append '(("\\.clm$"  . lisp-mode)
		("\\.cm$"   . lisp-mode)
		("\\.cmn$"  . lisp-mode)
		("\\.ins$"  . lisp-mode)
		("\\.scm$"  . lisp-mode))
	      auto-mode-alist))

;;;
;;; ignore midi and sound files for autocompletion.

(setq completion-ignored-extensions 
        (append (list ".midi" ".mid" ".snd" ".aiff" ".wav" )
	        completion-ignored-extensions))

;;;
;;; Indent CM/CLM/CMN forms properly

(put 'if 'common-lisp-indent-function 1)
(put 'new 'common-lisp-indent-function 1)
(put 'io 'common-lisp-indent-function 1)
(put 'defobject 'common-lisp-indent-function 'defun)
(put 'process 'common-lisp-indent-function 0)
(put 'with-sound 'common-lisp-indent-function 'defun)
(put 'definstrument 'common-lisp-indent-function 'defun)
(put 'dopairs 'common-lisp-indent-function  1)
;; scheme
(put 'define 'common-lisp-indent-function 1)
(put 'define-class 'common-lisp-indent-function 2)
(put 'define-method 'common-lisp-indent-function 1)
(put 'define-list-struct 'common-lisp-indent-function 1)
(put 'letrec 'common-lisp-indent-function 1)

;;; Load listener.el code with compiled version preferred.

(load "/Applications/CommonMusic.app/Contents/MacOS/listener")

;;;
;;; Set the inferior lisp program and bind to "C-x l"

(setq inferior-lisp-program
      "/Applications/CommonMusic.app/Contents/MacOS/opencm.sh")

(global-set-key "\C-x\l" 'lisp-listener)  ; listener.el

;;;
;;; Start Lisp Listner

(lisp-listener inferior-lisp-program "openmcl")

;;;
;;; EOF



--Apple-Mail-10--21885117
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



--Apple-Mail-10--21885117--