summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
Diffstat (limited to 'paredit.el')
-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)))