Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

indent lisp code

1 view
Skip to first unread message

Renaud Pons

unread,
Feb 18, 1998, 3:00:00 AM2/18/98
to

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 - mailto:rp...@laas.fr

John Arley Burns

unread,
Feb 18, 1998, 3:00:00 AM2/18/98
to

Renaud Pons <rp...@laas.fr> writes:

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.

Marco Antoniotti

unread,
Feb 23, 1998, 3:00:00 AM2/23/98
to

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

Aaron Denney

unread,
Feb 28, 1998, 3:00:00 AM2/28/98
to

On 23 Feb 1998 11:59:06 +0100, Marco Antoniotti <mar...@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


0 new messages