emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Common Lisp indentation bug fix/new feature


From: Tim Cross
Subject: Re: Common Lisp indentation bug fix/new feature
Date: Wed, 23 Nov 2011 09:28:25 +1100

The LOOP macro in CL is quite a complex/powerful beastie - a language
in/of itself really. Itcertainly has special indentation/formatting
requirements. I guess this has never really been addressed because
there are very few people who really know and understand the power of
LOOP. Most I've met know specific parts quite well, but often express
surprise when someone else points out alternative ways of expressing
similar/same constructs  etc.

I would suggest that taking a cue from the SLIME developers is
probably the wisest route to follow as I suspect they are probably the
largest user group for CL coding under emacs. Regardless of how
good/bad the native/standard mode provided by emacs is, if the way it
does indenting is not generally accepted by the SLIME community, any
efforts put in by emacs devs is largely wasted.  I would expect that
any proposals concerning LOOP in CL will likely generate some debate -
it is one of those constructs which seems to generate a fair amount of
emotional responses - either you like it or hate it and those who like
it seem to like it for very different reasons and have quite strong
views on how it should be used and formatted.

Tim

On Wed, Nov 23, 2011 at 5:09 AM, Lars Magne Ingebrigtsen <address@hidden> wrote:
> Stefan Monnier <address@hidden> writes:
>
>> I'd be interested to see how SMIE handles it.
>
> I don't know from SMIE, but I was told by my cow-orkers today that SLIME
> has its own version of cl-indent.el that does LOOP indentation
> properly.  (Allegedly the only difference between the version in SLIME
> and Emacs is the LOOP handling.)
>
> It indents like this:
>
>  (loop for z
>          from 1 upto 5
>        do (princ z)
>           (terpri)
>           (terpri)
>        when (zerop z)
>          finally (terpri)
>                  (terpri))
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>  bloggy blog http://lars.ingebrigtsen.no/
>
>



-- 
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]