From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Common Lisp indentation bug fix/new feature Date: Wed, 23 Nov 2011 09:28:25 +1100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1322000926 30872 80.91.229.12 (22 Nov 2011 22:28:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2011 22:28:46 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 22 23:28:40 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RSypS-00020I-Mr for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 23:28:38 +0100 Original-Received: from localhost ([::1]:47708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSypR-00004q-SN for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 17:28:37 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:54156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSypL-0008WC-7R for emacs-devel@gnu.org; Tue, 22 Nov 2011 17:28:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSypH-00022q-7u for emacs-devel@gnu.org; Tue, 22 Nov 2011 17:28:31 -0500 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:48689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSypH-00022k-42 for emacs-devel@gnu.org; Tue, 22 Nov 2011 17:28:27 -0500 Original-Received: by yenm12 with SMTP id m12so921093yen.0 for ; Tue, 22 Nov 2011 14:28:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=aP/lmRqi/ESi7MRX4lZt5EgilhW4olgDLwcu8a+rrRI=; b=mKbiDc6I5BhlmQ7KZV1XXRe4yIn2pF9sxNP24CbrqxwmOxxKZr4GZAgcJSALkHz2Fr /YG6bjPC1f4TswV6QCb272zj51/kzM2OtJD0E832OLILFS+44HCSjvPT9nIBlFK50m1y 2gpX0bmj/LUzm1d+qf0vSGoZ9Ch7bcbQRsqQE= Original-Received: by 10.50.57.138 with SMTP id i10mr16540805igq.3.1322000905543; Tue, 22 Nov 2011 14:28:25 -0800 (PST) Original-Received: by 10.231.35.74 with HTTP; Tue, 22 Nov 2011 14:28:25 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146161 Archived-At: 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 w= rote: > Stefan Monnier 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. =A0(Allegedly the only difference between the version in SLIME > and Emacs is the LOOP handling.) > > It indents like this: > > =A0(loop for z > =A0 =A0 =A0 =A0 =A0from 1 upto 5 > =A0 =A0 =A0 =A0do (princ z) > =A0 =A0 =A0 =A0 =A0 (terpri) > =A0 =A0 =A0 =A0 =A0 (terpri) > =A0 =A0 =A0 =A0when (zerop z) > =A0 =A0 =A0 =A0 =A0finally (terpri) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(terpri)) > > -- > (domestic pets only, the antidote for overdose, milk.) > =A0bloggy blog http://lars.ingebrigtsen.no/ > > --=20 Tim Cross