[CM] xcm file (again)

Rick Taube taube@uiuc.edu
Tue, 13 May 2003 09:52:51 -0500


Here is the contents of my clisp xcm script from my osx machine. Note 
that the line starting with "xemacs" is one long line. Of course the 
pathnames in this particula xcm script reflect my file system so you 
will have to edit these for your machine.

xcm:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
#!/bin/sh

if [ ! `which xemacs` ] ; then
         echo "xcm: can't find xemacs."
         exit 1
fi

xemacs -l "/Lisp/cm-2.4.0/etc/xemacs/listener.el" -eval '(lisp-listener 
"/sw/bin/clisp -I -M /Lisp/bin/cm-2.4.0/clisp/cm.mem -i 
/Lisp/bin/cm-2.4.0/clisp/cminit.lisp" "clisp")' &
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-

the script is simple -- it just starts xemacs and tells it to load the 
"listener.el" file from the cm directory and then to evaluate the 
function call (lisp-listener ...) the gobbledy-gook in the first string 
passed lisp-listener is the command line arg that xemacs will use to 
start up cm under clisp.  the second arg ("clisp") is an optional arg 
that conditionalizes the Listener window AND the Lisp edit buffer for a 
particular lisp implemntation.   For example, you can abort any Lisp 
error in any Lisp by typing the Emacs command:
	C-x C-.
ie control-x control-dot.  This command works in any lisp-mode edit 
buffer too, ie yhou dont have to select the Listener window before you 
execute it. If you want to start the Listener from INSIDE xemacs, add 
the following to your ~/.xemacs/init.el file. Again, you will have to 
change the ppathnames to reflect your machine

~/.xemacs/init.el:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
(require 'inf-lisp)
(load "/Lisp/cm-2.4.0/etc/xemacs/listener.el")
(setq inferior-lisp-program "/sw/bin/clisp -I -M 
/Lisp/bin/cm-2.4.0/clisp/cm.mem -i 
/Lisp/bin/cm-2.4.0/clisp/cminit.lisp")
(global-set-key "\C-x\l" 'lisp-listener)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-

again, the line starting with 'setq' must be all one line.

Then type
	C-x l
to start the listener