summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2011-03-22 22:16:20 +0000
committerTaylor R Campbell <campbell@mumble.net>2011-03-22 22:16:20 +0000
commitd9ecc6d686c52255e764f69d6029c916cb67bc8a (patch)
treeb66b2b03d427fd277be65ce0118029dab54495b7 /paredit.el
parent8a2d457d79edf5e19dd1f480335956b5b6d816c1 (diff)
Handle scan errors in `paredit-scan-sexps-hack'.
Ignore-this: 1f0109619737b5836077f22e651dc390 Avoids dangling opening delimiters in `paredit-insert-pair'. darcs-hash:20110322221620-00fcc-dff68effdbbb1b95f5b6d5c142e1ba4bb48bf3e5
Diffstat (limited to 'paredit.el')
-rw-r--r--paredit.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/paredit.el b/paredit.el
index 5c27bab..2e2fb28 100644
--- a/paredit.el
+++ b/paredit.el
@@ -757,7 +757,9 @@ If such a comment exists, delete the comment (including all leading
(count 0))
(catch 'exit
(while (< count magnitude)
- (let ((p (scan-sexps (point) direction)))
+ (let ((p
+ (paredit-handle-sexp-errors (scan-sexps (point) direction)
+ nil)))
(if (not p) (throw 'exit nil))
(goto-char p))
(setq count (+ count 1)))))