From: dpapathanasiou
Subject: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <1173481523.577651.114680@8g2000cwh.googlegroups.com>
Supposed I have some code like this:

(let ((blah '(a))
      (more-blah '(b)))
  (mapcar #'(lambda (x)
              (do-some-stuff x))
          another-list))

But then I decide I don't need to define blah and more-blah so I
delete those lines:

  (mapcar #'(lambda (x)
              (do-some-stuff x))
          another-list))

Now I need to re-indent what remains to the left.

Is there an automatic way (i.e. in one or two keystrokes) to do this
under Emacs+SLIME?

I'm sure I've missed something in the documentation, but I'm sure what
this feature is called, and as a result, I haven't found an
explanation for it.

Can anyone help?

From: Edi Weitz
Subject: Re: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <u4pouvwbs.fsf@agharta.de>
On 9 Mar 2007 15:05:23 -0800, "dpapathanasiou" <···················@gmail.com> wrote:

> Supposed I have some code like this:
>
> (let ((blah '(a))
>       (more-blah '(b)))
>   (mapcar #'(lambda (x)
>               (do-some-stuff x))
>           another-list))
>
> But then I decide I don't need to define blah and more-blah so I
> delete those lines:
>
>   (mapcar #'(lambda (x)
>               (do-some-stuff x))
>           another-list))
>
> Now I need to re-indent what remains to the left.
>
> Is there an automatic way (i.e. in one or two keystrokes) to do this
> under Emacs+SLIME?

Try for example backward-up-list (C-M-u), then indent-sexp (C-M-q).

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: dpapathanasiou
Subject: Re: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <1173484703.418868.238610@t69g2000cwt.googlegroups.com>
> Try for example backward-up-list (C-M-u), then indent-sexp (C-M-q).

Thanks, that's exactly what I needed.

Where are all these commands documented?

I'd checked the SLIME page documentation (http://common-lisp.net/
project/slime/doc/html/), specifically the section on indentation
(http://common-lisp.net/project/slime/doc/html/Semantic-
indentation.html#Semantic-indentation) but I couldn't figure it out.
From: Bernd Beuster
Subject: Re: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <essslc$1va$1@online.de>
dpapathanasiou schrieb:
> Where are all these commands documented?

Maybe you can try C-h b (describe-bindings).

-- 
Bernd
From: Rainer Joswig
Subject: Re: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <joswig-7B31ED.10484410032007@news-europe.giganews.com>
In article <············@online.de>,
 Bernd Beuster <·············@lycos.de> wrote:

> dpapathanasiou schrieb:
> > Where are all these commands documented?
> 
> Maybe you can try C-h b (describe-bindings).

Also check out C-h m, which describes the 'mode'
and the minor modes.

-- 
http://lispm.dyndns.org
From: Rob St. Amant
Subject: Re: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <esudhi$ocg$1@blackhelicopter.databasix.com>
Rainer Joswig <······@lisp.de> writes:

> In article <············@online.de>,
>  Bernd Beuster <·············@lycos.de> wrote:
>
>> dpapathanasiou schrieb:
>> > Where are all these commands documented?
>> 
>> Maybe you can try C-h b (describe-bindings).
>
> Also check out C-h m, which describes the 'mode'
> and the minor modes.

Not to mention M-x apropos, which you might use to search for
something like "indent".
From: Edi Weitz
Subject: Re: Emacs + SLIME: automatically re-indenting code following edits
Date: 
Message-ID: <uvehalyqc.fsf@agharta.de>
On 9 Mar 2007 15:58:23 -0800, "dpapathanasiou" <···················@gmail.com> wrote:

> Where are all these commands documented?
>
> I'd checked the SLIME page documentation (http://common-lisp.net/
> project/slime/doc/html/), specifically the section on indentation
> (http://common-lisp.net/project/slime/doc/html/Semantic-
> indentation.html#Semantic-indentation) but I couldn't figure it out.

These aren't SLIME commands, but they come out-of-the-box with Emacs,
so look at the built-in Emacs documentation, or see for example here:

  http://groups.google.de/group/comp.lang.lisp/browse_thread/thread/aac5c3f43b3ffe7e/41c58160793f2c83
  http://cl-cookbook.sourceforge.net/emacs-ide.html#Slide-10

HTH,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")