[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: on adding a function call to a s-exp
From: |
João Távora |
Subject: |
Re: on adding a function call to a s-exp |
Date: |
Tue, 12 Jun 2018 18:19:42 +0100 |
On Tue, Jun 12, 2018 at 6:07 PM, Eric Abrahamsen <eric@ericabrahamsen.net>
wrote:
> Óscar Fuentes <ofv@wanadoo.es> writes:
>
> > João Távora <joaotavora@gmail.com> writes:
> >
> > [...]
> >
> > It is true that paredit is irritating sometimes, but very convenient
> > otherwise.
> >
> > For the benefit of those who don't know it, let's put a simple example.
> > Suppose that you have:
> >
> > (foo)
> > (bar)
> >
> > but now you wish to wrap those function calls inside a conditional. So
> > you write:
> >
> > (when something
> > (foo)
> > (bar))
> >
> > Which requires moving the cursor through several lines just to add a
> > parenthesis.
> >
> > With paredit, you write
> >
> > (when something_)
> > (foo)
> > (bar)
>
> I typically write "M-2 (when...", which wraps automatically. Unless I'm
> wrapping some huge chunk where it isn't obvious how many sexps should be
> wrapped.
>
Nice tip, but you mean M-2 M-( w h e n , right? (of course you get to hold
the M).
When I don't know how many there are, I just C-M-SPC until I hit an
error :-) I'm sure there's a better way, but this one works for me.
João
- Re: on adding a function call to a s-exp, (continued)
- Re: on adding a function call to a s-exp, Andreas Röhler, 2018/06/13
- Re: on adding a function call to a s-exp, João Távora, 2018/06/13
- Message not available
- Re: on adding a function call to a s-exp, Emanuel Berg, 2018/06/13
- Re: on adding a function call to a s-exp, João Távora, 2018/06/13
- RE: on adding a function call to a s-exp, Drew Adams, 2018/06/13
- Message not available
- Re: on adding a function call to a s-exp, Emanuel Berg, 2018/06/13
- Re: on adding a function call to a s-exp, João Távora, 2018/06/12
- Re: on adding a function call to a s-exp, Eric Abrahamsen, 2018/06/12
- Re: on adding a function call to a s-exp, Óscar Fuentes, 2018/06/12
- Re: on adding a function call to a s-exp, Eric Abrahamsen, 2018/06/12
- Re: on adding a function call to a s-exp,
João Távora <=
- Re: on adding a function call to a s-exp, Eric Abrahamsen, 2018/06/12
- Re: on adding a function call to a s-exp, João Távora, 2018/06/12
- Message not available
- Re: on adding a function call to a s-exp, Robert Girault, 2018/06/13
- Message not available
- Re: on adding a function call to a s-exp, Robert Girault, 2018/06/13
- Re: on adding a function call to a s-exp, João Távora, 2018/06/13
Message not available