branch: elpa/paredit
commit d80a9db08c434777f4bbe47390eea8ec7cbd729c
Author: Taylor R Campbell <[email protected]>
Commit: Taylor R Campbell <[email protected]>
Fail early in `paredit-convolute-sexp'.
Ignore-this: 9262a1436f4dcda20711a80a776cddea
darcs-hash:20110507210933-00fcc-65b52e19c6ab91c2e8a9ed93e03ede7a70e87a14
---
paredit.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/paredit.el b/paredit.el
index e8a794c..c8b82ca 100644
--- a/paredit.el
+++ b/paredit.el
@@ -2133,6 +2133,8 @@ Wrap the enclosing list in a new list prefixed by the
saved text.
With a prefix argument N, move up N lists before wrapping."
(interactive "p")
(paredit-lose-if-not-in-sexp 'paredit-convolute-sexp)
+ ;; Make sure we can move up before destroying anything.
+ (save-excursion (backward-up-list) (backward-up-list))
(let (open close) ;++ Is this a good idea?
(let ((prefix
(let ((end (point)))