From: Paulo J. Matos aka PDestroy
Subject: Programming Lisp in Emacs
Date: 
Message-ID: <98sqhh$6rd$1@venus.telepac.pt>
I'm trying to program Lisp in Emacs. Not eLisp, it's Common Lisp...
My emacs is running under Windows2000 but the commands in windows2000 and
Unix Systems are the same, i think.
I'm having some problems.
When I create the Lisp file it recognizes it since it colours the defuns and
so but it is not automatticly indenting it. Only if I press tab is the the
indent on that line occurs correctly.
If I press C-c C-z to run Lisp (I think this will run my lisp compiler and
compile what it has done) it says it doesn't know where my lisp is. How can
I configure it?

Best regards,

--
Paulo J. Matos aka PDestroy
http://www.pdestroy.net
ICQ UIN - 361853

--
Real systems have no top.
           - Meyer, B. (on the discussion of top-down design of a system)

From: Stefan Monnier
Subject: Re: Programming Lisp in Emacs
Date: 
Message-ID: <5l4rwtwzfo.fsf@rum.cs.yale.edu>
>>>>> "Paulo" == Paulo J Matos aka PDestroy <········@netcabo.pt> writes:
> When I create the Lisp file it recognizes it since it colours the defuns and
> so but it is not automatticly indenting it. Only if I press tab is the the
> indent on that line occurs correctly.

That's the standard Emacs understanding of `automatic indentation'.
You might want to bind

        (global-set-key [(return)] 'newline-and-indent)

to get indentation when you type RET.

> If I press C-c C-z to run Lisp (I think this will run my lisp compiler and
> compile what it has done) it says it doesn't know where my lisp is. How can
> I configure it?

Take a look at `inferior-lisp-program'.


        Stefan
From: Kent M Pitman
Subject: Re: Programming Lisp in Emacs
Date: 
Message-ID: <sfwvgp993vt.fsf@world.std.com>
[ replying to comp.lang.lisp only
  http://world.std.com/~pitman/pfaq/cross-posting.html ]

"Paulo J. Matos aka PDestroy" <········@netcabo.pt> writes:

> When I create the Lisp file it recognizes it since it colours the defuns and
> so but it is not automatticly indenting it. Only if I press tab is the the
> indent on that line occurs correctly.

This part is right.  The default Emacs lisp mode is not "electric".  That is,
it does not aggressively seek to force indentation on you that you did not
ask for.  It leaves the indentation (or lack thereof) as you wrote it.
One normally writes new code in Emacs by typing a line and then hitting
Linefeed (rather than Enter/Return); Linfeed is defined to do the effect
of Return + Tab and sets you in the right place to type the next line.

> If I press C-c C-z to run Lisp (I think this will run my lisp compiler and
> compile what it has done) it says it doesn't know where my lisp is. How can
> I configure it?

In the Emacs I'm using (which is an old one):

c-h c c-c c-z         tells me that this runs run-lisp

c-h d run-lisp RET    tells me lots of stuff, among which is that there's
                      a variable inferior-lisp-program you have to set,
                      and that you can give c-c c-z an argument to edit
                      the command line...

Your Emacs might be configured differently if it's a more recent version,
but the self-documentation features on c-h, including c-h c and c-h d 
as well as m-x apropos are there to help you figure out what's going on.

Good luck.
From: Marco Antoniotti
Subject: Re: Programming Lisp in Emacs
Date: 
Message-ID: <y6cwv9p3e60.fsf@octagon.mrl.nyu.edu>
Kent M Pitman <······@world.std.com> writes:

> In the Emacs I'm using (which is an old one):
> 
> c-h c c-c c-z         tells me that this runs run-lisp
> 
> c-h d run-lisp RET    tells me lots of stuff, among which is that there's
>                       a variable inferior-lisp-program you have to set,
>                       and that you can give c-c c-z an argument to edit
>                       the command line...

You mean that YOU are NOT using ILISP? :)

My heart is saddened by dark sadness.  I'll write a (defun prozac ())
function. :)

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group	tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA			http://bioinformatics.cat.nyu.edu
             Like DNA, such a language [Lisp] does not go out of style.
			      Paul Graham, ANSI Common Lisp
From: Kai Großjohann
Subject: Re: Programming Lisp in Emacs
Date: 
Message-ID: <vafn1alpzez.fsf@lucy.cs.uni-dortmund.de>
On Fri, 16 Mar 2001, Paulo J. Matos aka PDestroy wrote:

> When I create the Lisp file it recognizes it since it
> colours the defuns and so but it is not automatticly indenting
> it. Only if I press tab is the the indent on that line occurs
> correctly.

Does it help to use C-j rather than RET?  I use the following so I can
always use RET:

(global-set-key (kbd "RET") 'newline-and-indent)
(define-key text-mode-map (kbd "RET") 'newline)

> If I press C-c C-z to run Lisp (I think this will run my lisp
> compiler and compile what it has done) it says it doesn't know where
> my lisp is. How can I configure it?

Type `C-h k C-c C-z' for explanation what `C-c C-z' does.  This will
point you to the right variable.

kai
-- 
Be indiscrete.  Do it continuously.