Using Paredit to wrap existing expression

clojure, emacs, lisp, paredit

Solution

`paredit-wrap-round` command may help (bound to M-( in the paredit version I use).

Problem

I'm using Emacs in Paredit mode for Lisp code. I'm trying to wrap a function call in println: ``` (square 5) (println (square 5)) ``` What ends up happening in paredit is this: ``` (square 5) (println) (square 5) ``` There is no way i can delete closing paren of println and move it to the end. The way i'm doing it now is to: 1. delete function call and yank it within println 2. write println without paren, visually select code and enclose in parens ``` (square 5) println (square 5) => select block of code and type ( (println (square 5)) ``` Both of these approaches are tedious. This seems to be a common problem anytime i write code inside out in Paredit. Any help would be appreciated

Original source