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

Common Lisp Identation in Emacs

2 views
Skip to first unread message

Aleksandr Skobelev

unread,
Mar 1, 2006, 10:32:54 AM3/1/06
to
Hello!

I'm just wondering, if I'm totally wrong or the lisp identation in Emacs
by default doesn't meet very well to requirements of CL style and all the
co-lispers use clisp-indent.el (or maybe something like) to fix this?

Thanks in advance,
Aleksandr

Russell McManus

unread,
Mar 1, 2006, 1:24:41 PM3/1/06
to
Aleksandr Skobelev <publi...@list.ru> writes:

> I'm just wondering, if I'm totally wrong or the lisp identation in
> Emacs by default doesn't meet very well to requirements of CL style
> and all the co-lispers use clisp-indent.el (or maybe something like)
> to fix this?

From my init file:

(defun rdm-lisp-mode-hook ()
(setq lisp-indent-function 'common-lisp-indent-function)
(local-set-key (kbd "[") 'insert-parentheses)
(slime-mode t))
(add-hook 'lisp-mode-hook 'rdm-lisp-mode-hook)

-russ

Petter Gustad

unread,
Mar 1, 2006, 1:31:17 PM3/1/06
to
Aleksandr Skobelev <publi...@list.ru> writes:

> I'm just wondering, if I'm totally wrong or the lisp identation in Emacs
> by default doesn't meet very well to requirements of CL style and all the
> co-lispers use clisp-indent.el (or maybe something like) to fix this?

(setq lisp-indent-function 'common-lisp-indent-function)

Petter
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Aleksandr Skobelev

unread,
Mar 2, 2006, 6:02:32 AM3/2/06
to

Russell McManus <russell...@yahoo.com> writes:

But without (load-library "clisp-indent") standard
common-lisp-indent-function still indents some forms improperly. For
example it indents

(function plus (lambda (x y)
(+ x y)))

as

(function plus (lambda (x y)
(+ x y)))

, and
(cond
((cond1)
(form1)
(form2)
(form3)))

as

(cond
((cond1)
(form1)
(form2)
(form3)))

0 new messages