[comp.emacs] customizing run-lisp

jr@bbn.com (John Robinson) (12/01/88)

In article <545200001@uxg.cso.uiuc.edu>, gengler@UXG writes:
>How do you change the command used by 'run-lisp' to invoke a
>lisp processor of a different name.
>
>Our system's (gould) lisp is invoked with the command 'clisp' not
>'lisp' as run-lisp expects.  How can I change this?

Here's run-lisp's definition:

(defun run-lisp ()
  "Run an inferior Lisp process, input and output via buffer *lisp*."
  (interactive)
  (switch-to-buffer (make-shell "lisp" inferior-lisp-program))
  (inferior-lisp-mode))

Insert a 'c' inside the string argument to make-shell.  Then place
your cursor after the last right-paren and type ^X^E (eval-last-sexp)
to install this modified run-lisp in your emacs.

To do this every time you start emacs, put the defun inside your
.emacs file.  To make run-lisp more general, replace the explicit
string with a variable, and defvar it as apporpriate.
--
/jr
jr@bbn.com or bbn!jr

ilham@athena.mit.edu (Ilham Ahmed) (12/01/88)

In article <32874@bbn.COM> jr@bbn.com (John Robinson) writes:
>In article <545200001@uxg.cso.uiuc.edu>, gengler@UXG writes:
>>How do you change the command used by 'run-lisp' to invoke a
>>lisp processor of a different name.
>>
>>Our system's (gould) lisp is invoked with the command 'clisp' not
>>'lisp' as run-lisp expects.  How can I change this?
>
>Here's run-lisp's definition:
>
>(defun run-lisp ()
>  "Run an inferior Lisp process, input and output via buffer *lisp*."
>  (interactive)
>  (switch-to-buffer (make-shell "lisp" inferior-lisp-program))
>  (inferior-lisp-mode))
>
>Insert a 'c' inside the string argument to make-shell.  Then place
>your cursor after the last right-paren and type ^X^E (eval-last-sexp)
>to install this modified run-lisp in your emacs.
>
>To do this every time you start emacs, put the defun inside your
>.emacs file.  To make run-lisp more general, replace the explicit
>string with a variable, and defvar it as apporpriate.
>--
>/jr
>jr@bbn.com or bbn!jr


The way to invoke another lisp is to setq the inferior-lisp-program
variable. So in your case you should put in your .emacs :

	(setq inferior-lisp-program  "clisp")

I do not know if this is true everywhere, but there is an error in one
of the functions in shell.el. The function is "inferior-lisp-mode" and
the error in a statement in that procedure should be changed from :

	(lisp-mode-variables)

to
	(lisp-mode-variables nil)

as "lisp-mode-variables" defined in lisp-mode.el requires an argument.
Hope that helps.

						- Ilham
						  User Consultant
						  Project Athena, MIT


==============================================================================

            \\\!///             From  :   Ilhamuddin Ahmed
             _   _              UUCP  :   {backbone}!mit-eddie!athena!ilham
           ( Q   Q )            Arpa  :   ilham@juicy-juice.lcs.mit.edu
 ---,,,,-------U-------,,,,---  USnail:   211 Walcott
                                          3, Ames Street
            HELLO!!!                      Cambridge, MA 02139.
 -----------------------------            (617)-225-6256.

==============================================================================

jr@bbn.com (John Robinson) (12/01/88)

In article <32874@bbn.COM>, I (jr@bbn) write:
>In article <545200001@uxg.cso.uiuc.edu>, gengler@UXG writes:
>>How do you change the command used by 'run-lisp' to invoke a
>>lisp processor of a different name.
>
>Insert a 'c' inside the string argument to make-shell.

No no no dummy.  As another poster noted, the program name is taken
already from the variable inferior-lisp-program.  Simply setq this to
the right thing ("clisp").  We now return you to your regularly-wired
mind.
--
/jr
jr@bbn.com or bbn!jr

shirono@hcx3.SSD.HARRIS.COM (12/01/88)

In comp.emacs, jr@bbn.com writes:
> (defun run-lisp ()
>   "Run an inferior Lisp process, input and output via buffer *lisp*."
>   (interactive)
>   (switch-to-buffer (make-shell "lisp" inferior-lisp-program))
>   (inferior-lisp-mode))
>
> Insert a 'c' inside the string argument to make-shell.

WRONG.

The first argument to make-shell is the name of the process, not the actual
program to execute (BTW, with '*' pre- and appended, it is the name of the
buffer to be used).  The program to execute is inferior-lisp-program; and
is defined to be "lisp" somewhere in the distribution (it doesn't matter
where):

	inferior-lisp-program's value is "lisp"

	Documentation:
	*Program name for invoking an inferior Lisp with `run-lisp'.

So, you can
	M-x set-variable inferior-lisp-program "clisp"

once you have emacs running, or
	(setq inferior-lisp-program "clisp")

in $HOME/.emacs

--Roberto
______________________________________________________________________________
                               ||   Internet: shirono@ssd.harris.com
     Roberto Shironoshita      ||
      Harris Corporation       ||             ...!novavax---\
   Computer Systems Division   ||   UUCP:     ...!uunet-------!hcx1!shirono
                               ||             ...!mit-eddie-/
------------------------------------------------------------------------------
DISCLAIMER: The opinions expressed here are my own; they in no way reflect the
            opinion or policies of Harris Corporation.