From: Tim Cross <theophilusx@gmail.com>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Common Lisp indentation bug fix/new feature
Date: Wed, 23 Nov 2011 09:28:25 +1100 [thread overview]
Message-ID: <CAC=50j_=+xwXRaUE1Uvp91SZRcdzGuhDaHOwCbj0yALBGG_B8A@mail.gmail.com> (raw)
In-Reply-To: <m31ut0c9l9.fsf@stories.gnus.org>
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 <larsi@gnus.org> wrote:
> Stefan Monnier <monnier@IRO.UMontreal.CA> 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
next prev parent reply other threads:[~2011-11-22 22:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 22:26 Common Lisp indentation bug fix/new feature Lars Magne Ingebrigtsen
2011-11-22 14:57 ` Stefan Monnier
2011-11-22 15:35 ` Lars Magne Ingebrigtsen
2011-11-22 15:52 ` Lawrence Mitchell
2011-11-22 16:43 ` Stefan Monnier
2011-11-22 18:09 ` Lars Magne Ingebrigtsen
2011-11-22 22:28 ` Tim Cross [this message]
2012-03-31 10:21 ` Nikodemus Siivola
2012-04-03 3:47 ` Lars Magne Ingebrigtsen
2012-04-03 10:13 ` Nikodemus Siivola
2012-04-03 14:53 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC=50j_=+xwXRaUE1Uvp91SZRcdzGuhDaHOwCbj0yALBGG_B8A@mail.gmail.com' \
--to=theophilusx@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.