From: Renaud Pons
Subject: indent lisp code
Date: 
Message-ID: <ttdn2fparoa.fsf@laas.fr>
Hello,

I am looking for a program to indent lisp code. I have lisp code
written with lines containing more than 140 characters. I have to
write a reference manual for this source. In order to correctly
include source code in the manual (I use Latex), I would like to
indent the code to have lines containing about 70 characters max.
I tried to use xemacs (auto-fill and indent in lisp-mode) but it
does not product the expected result (especially when lines contain
comments...). Last remark: it is Lelisp code.

Thanks in advance
-- 
Renaud - ············@laas.fr

From: John Arley Burns
Subject: Re: indent lisp code
Date: 
Message-ID: <wzsopg1fo6.fsf@utwig.mesas.com>
Renaud Pons <·····@laas.fr> writes:

> Hello,
> 
> I am looking for a program to indent lisp code. I have lisp code
> written with lines containing more than 140 characters. I have to
> write a reference manual for this source. In order to correctly
> include source code in the manual (I use Latex), I would like to
> indent the code to have lines containing about 70 characters max.
> I tried to use xemacs (auto-fill and indent in lisp-mode) but it
> does not product the expected result (especially when lines contain
> comments...). Last remark: it is Lelisp code.

If the lisp mode doesn't do what you want, you might try studying
font-lock-mode; it is in use by many modes and has alot of indentation
configuration. Also, check the options in lisp mode for indentation
styles.
From: Marco Antoniotti
Subject: Re: indent lisp code
Date: 
Message-ID: <lwyaz2poxx.fsf@galvani.parades.rm.cnr.it>
John Arley Burns <······@utwig.mesas.com> writes:

> Renaud Pons <·····@laas.fr> writes:
> 
> > Hello,
> > 
> > I am looking for a program to indent lisp code. I have lisp code
> > written with lines containing more than 140 characters. I have to
> > write a reference manual for this source. In order to correctly
> > include source code in the manual (I use Latex), I would like to
> > indent the code to have lines containing about 70 characters max.
> > I tried to use xemacs (auto-fill and indent in lisp-mode) but it
> > does not product the expected result (especially when lines contain
> > comments...). Last remark: it is Lelisp code.
> 
> If the lisp mode doesn't do what you want, you might try studying
> font-lock-mode; it is in use by many modes and has alot of indentation
> configuration. Also, check the options in lisp mode for indentation
> styles.

Not quite.  (X)Emacs Lisp modes and derivatives do not indent well
Common Lisp code (ever tried '(defmethod xxx :after ((w e))) )'?).

I am not surprised that it does not indent well LeLisp code (who ahs
seen LeLisp code outside France and a few Esprit projects? :) ).

To do the right thing you should customize the lisp indentation
functions of (X)Emacs.  Check the files  'emacs-lisp/lisp-mode.el' and
'emacs-lisp/cl-indent.el' in the 'lisp' directory of the Emacs
distribution as a starting point.


-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - (0)6 - 68 80 79 23, fax. +39 - (0)6 - 68 80 79 26
http://www.parades.rm.cnr.it
From: Aaron Denney
Subject: Re: indent lisp code
Date: 
Message-ID: <slrn6ffa7e.giu.wnoise@amatho.ugcs.caltech.edu>
On 23 Feb 1998 11:59:06 +0100, Marco Antoniotti <·······@galvani.parades.rm.cnr.it> wrote:
> Not quite.  (X)Emacs Lisp modes and derivatives do not indent well
> Common Lisp code (ever tried '(defmethod xxx :after ((w e))) )'?).
> 
> I am not surprised that it does not indent well LeLisp code (who ahs
> seen LeLisp code outside France and a few Esprit projects? :) ).
> 
> To do the right thing you should customize the lisp indentation
> functions of (X)Emacs.  Check the files  'emacs-lisp/lisp-mode.el' and
> 'emacs-lisp/cl-indent.el' in the 'lisp' directory of the Emacs
> distribution as a starting point.

Many version of vi format lisp fairly well.  You'll need to insert
newlines by hand, but it can indent nicely.

-- 
Aaron Denney