branch: elpa/paredit
commit d9ecc6d686c52255e764f69d6029c916cb67bc8a
Author: Taylor R Campbell <[email protected]>
Commit: Taylor R Campbell <[email protected]>
Handle scan errors in `paredit-scan-sexps-hack'.
Ignore-this: 1f0109619737b5836077f22e651dc390
Avoids dangling opening delimiters in `paredit-insert-pair'.
darcs-hash:20110322221620-00fcc-dff68effdbbb1b95f5b6d5c142e1ba4bb48bf3e5
---
paredit.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)))))