summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
Diffstat (limited to 'paredit.el')
-rw-r--r--paredit.el13
1 files changed, 5 insertions, 8 deletions
diff --git a/paredit.el b/paredit.el
index 33dff5e..a05ed06 100644
--- a/paredit.el
+++ b/paredit.el
@@ -2079,8 +2079,10 @@ With a prefix argument N, move up N lists before wrapping."
(search-forward "\\" nil t))
(delete-char -1)
(forward-char))
- (funcall (condition-case condition (progn (check-parens) 'buffer-string)
- (error (lambda () nil))))))
+ (paredit-handle-sexp-errors
+ (progn (scan-sexps (point-min) (point-max))
+ (buffer-string))
+ nil)))
;;;; Slurpage & Barfage
@@ -2477,12 +2479,7 @@ If no parse state is supplied, compute one from the beginning of the
(progn
(save-restriction
(narrow-to-region start end)
- ;; Can't use `check-parens' here -- it signals the wrong kind
- ;; of errors.
- (save-excursion
- (goto-char (point-min))
- (while (not (eobp))
- (forward-sexp))))
+ (scan-sexps (point-min) (point-max)))
t)
nil))