summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2011-05-07 21:09:33 +0000
committerTaylor R Campbell <campbell@mumble.net>2011-05-07 21:09:33 +0000
commitd80a9db08c434777f4bbe47390eea8ec7cbd729c (patch)
treeaa4d4b0f3da647685223449466c0bee809845dee
parentaa42c19ac4fdd4bed22ab4c6dff93bf5a86dca3f (diff)
Fail early in `paredit-convolute-sexp'.
Ignore-this: 9262a1436f4dcda20711a80a776cddea darcs-hash:20110507210933-00fcc-65b52e19c6ab91c2e8a9ed93e03ede7a70e87a14
-rw-r--r--paredit.el2
1 files changed, 2 insertions, 0 deletions
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)))